@akanjs/cli 2.4.1 → 2.4.2-rc.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 (51) hide show
  1. package/.build-stamp +1 -1
  2. package/{agent.command-sa12ccz3.js → agent.command-ash7wabs.js} +7 -7
  3. package/{application.command-jv63vv7z.js → application.command-zm47j93m.js} +5 -5
  4. package/{applicationBuildRunner-vzjdgv1g.js → applicationBuildRunner-554a2vnk.js} +6 -1
  5. package/{applicationReleasePackager-brvth6rs.js → applicationReleasePackager-pjbxc793.js} +1 -1
  6. package/buildBatch.proc.js +3 -3
  7. package/{capacitorApp-wnxzrppx.js → capacitorApp-wc75rvfm.js} +3 -3
  8. package/{cloud.command-8z2nc6b2.js → cloud.command-vwpzten0.js} +10 -10
  9. package/{context.command-0m854xme.js → context.command-j0kq87xa.js} +15 -15
  10. package/{dependencyScanner-m4x5maek.js → dependencyScanner-f6grrep3.js} +2 -2
  11. package/{guideline.command-dsdpae45.js → guideline.command-1m4jwhv0.js} +5 -5
  12. package/incrementalBuilder.proc.js +22 -14
  13. package/{index-eja0sbm6.js → index-0wgpfp7t.js} +6 -6
  14. package/{index-1b9f27pm.js → index-2nb022xv.js} +3 -3
  15. package/{index-n2mp0f48.js → index-31183bxt.js} +6 -6
  16. package/{index-p9f1rpbp.js → index-31e8cwjq.js} +5 -5
  17. package/{index-x53a5nya.js → index-46tjzh6s.js} +1 -1
  18. package/{index-61keag0s.js → index-67546d0j.js} +4 -1
  19. package/{index-q4sc46ec.js → index-79v9jwqe.js} +3 -3
  20. package/{index-m0vg9n8z.js → index-7k9sj7j5.js} +3 -2
  21. package/{index-e3b8ms64.js → index-8dsjmcbp.js} +11 -11
  22. package/{index-2v10yr8g.js → index-ckywhpvp.js} +1 -1
  23. package/{index-d2e2y85b.js → index-cp26p7qd.js} +4 -4
  24. package/{index-eqxmxan6.js → index-ehjhzg5y.js} +1 -1
  25. package/{index-phj3ewxv.js → index-en4zpzdm.js} +2 -2
  26. package/{index-qacv44mm.js → index-f1x6fe2e.js} +1 -1
  27. package/{index-m04as81s.js → index-mpj63mbw.js} +4 -4
  28. package/{index-3a4vntr0.js → index-n08vr4hh.js} +2 -2
  29. package/{index-5vvwc0cz.js → index-nsj2ftxj.js} +1 -1
  30. package/{index-0t7pwff2.js → index-s6nk9815.js} +182 -64
  31. package/{index-hk58kr1m.js → index-smt4re0s.js} +1 -1
  32. package/{index-zw4aqvwh.js → index-t5rn8q9f.js} +4 -4
  33. package/{index-h6pevatb.js → index-tnngmzgf.js} +7 -7
  34. package/{index-eay4t1te.js → index-xdf6rxyt.js} +3 -3
  35. package/{index-81epkybm.js → index-xjkjcbhd.js} +3 -3
  36. package/index.js +19 -19
  37. package/{library.command-fhx5ce8n.js → library.command-39eq3brk.js} +4 -4
  38. package/{localRegistry.command-18f61945.js → localRegistry.command-34zvgkys.js} +9 -9
  39. package/{module.command-29wvnb56.js → module.command-vwahdkzr.js} +8 -8
  40. package/{package.command-46r1dncm.js → package.command-wkwd5x5p.js} +5 -5
  41. package/package.json +2 -2
  42. package/{page.command-vxvqdzc0.js → page.command-9w85hrg0.js} +4 -4
  43. package/{primitive.command-yk622wmt.js → primitive.command-2hnr8h7f.js} +9 -9
  44. package/{quality.command-p0mb5xwt.js → quality.command-4kerz7mh.js} +3 -3
  45. package/{repair.command-nptckp6w.js → repair.command-zmwshmvr.js} +6 -6
  46. package/{routeSourceValidator-wbhmbwpj.js → routeSourceValidator-cncd92fv.js} +39 -0
  47. package/{scalar.command-bss14hez.js → scalar.command-9kanb73t.js} +7 -7
  48. package/templates/workspaceRoot/.gitignore.template +1 -0
  49. package/templates/workspaceRoot/AGENTS.md.template +14 -0
  50. package/{workflow.command-7fhqb33d.js → workflow.command-4areq0ex.js} +12 -12
  51. package/{workspace.command-xkcec7ky.js → workspace.command-02x93b10.js} +22 -22
@@ -1,21 +1,21 @@
1
1
  // @bun
2
2
  import {
3
3
  ModuleScript
4
- } from "./index-h6pevatb.js";
5
- import"./index-qacv44mm.js";
4
+ } from "./index-tnngmzgf.js";
5
+ import"./index-f1x6fe2e.js";
6
6
  import"./index-ss469dec.js";
7
7
  import {
8
8
  renderPrimitiveReport
9
- } from "./index-2v10yr8g.js";
10
- import"./index-eqxmxan6.js";
11
- import"./index-5vvwc0cz.js";
9
+ } from "./index-ckywhpvp.js";
10
+ import"./index-ehjhzg5y.js";
11
+ import"./index-nsj2ftxj.js";
12
12
  import {
13
13
  Module,
14
14
  Sys,
15
15
  command
16
- } from "./index-phj3ewxv.js";
17
- import"./index-0t7pwff2.js";
18
- import"./index-61keag0s.js";
16
+ } from "./index-en4zpzdm.js";
17
+ import"./index-s6nk9815.js";
18
+ import"./index-67546d0j.js";
19
19
  import"./index-6pz1j0zj.js";
20
20
  import"./index-r24hmh0q.js";
21
21
 
@@ -1,15 +1,15 @@
1
1
  // @bun
2
2
  import {
3
3
  PackageScript
4
- } from "./index-p9f1rpbp.js";
4
+ } from "./index-31e8cwjq.js";
5
5
  import {
6
6
  Pkg,
7
7
  Workspace,
8
8
  command
9
- } from "./index-phj3ewxv.js";
10
- import"./index-0t7pwff2.js";
11
- import"./index-x53a5nya.js";
12
- import"./index-61keag0s.js";
9
+ } from "./index-en4zpzdm.js";
10
+ import"./index-s6nk9815.js";
11
+ import"./index-46tjzh6s.js";
12
+ import"./index-67546d0j.js";
13
13
  import"./index-6pz1j0zj.js";
14
14
  import"./index-r24hmh0q.js";
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "2.4.1",
3
+ "version": "2.4.2-rc.0",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -34,7 +34,7 @@
34
34
  "@langchain/openai": "^1.4.6",
35
35
  "@tailwindcss/node": "^4.3.0",
36
36
  "@trapezedev/project": "^7.1.4",
37
- "akanjs": "2.4.1",
37
+ "akanjs": "2.4.2-rc.0",
38
38
  "chalk": "^5.6.2",
39
39
  "commander": "^14.0.3",
40
40
  "daisyui": "5.5.23",
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  PageScript
4
- } from "./index-qacv44mm.js";
4
+ } from "./index-f1x6fe2e.js";
5
5
  import {
6
6
  App,
7
7
  Module,
8
8
  command
9
- } from "./index-phj3ewxv.js";
10
- import"./index-0t7pwff2.js";
11
- import"./index-61keag0s.js";
9
+ } from "./index-en4zpzdm.js";
10
+ import"./index-s6nk9815.js";
11
+ import"./index-67546d0j.js";
12
12
  import"./index-6pz1j0zj.js";
13
13
  import"./index-r24hmh0q.js";
14
14
 
@@ -1,21 +1,21 @@
1
1
  // @bun
2
2
  import {
3
3
  PrimitiveScript
4
- } from "./index-m04as81s.js";
5
- import"./index-h6pevatb.js";
6
- import"./index-qacv44mm.js";
4
+ } from "./index-mpj63mbw.js";
5
+ import"./index-tnngmzgf.js";
6
+ import"./index-f1x6fe2e.js";
7
7
  import"./index-ss469dec.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-2v10yr8g.js";
11
- import"./index-eqxmxan6.js";
12
- import"./index-5vvwc0cz.js";
10
+ } from "./index-ckywhpvp.js";
11
+ import"./index-ehjhzg5y.js";
12
+ import"./index-nsj2ftxj.js";
13
13
  import {
14
14
  Workspace,
15
15
  command
16
- } from "./index-phj3ewxv.js";
17
- import"./index-0t7pwff2.js";
18
- import"./index-61keag0s.js";
16
+ } from "./index-en4zpzdm.js";
17
+ import"./index-s6nk9815.js";
18
+ import"./index-67546d0j.js";
19
19
  import"./index-6pz1j0zj.js";
20
20
  import"./index-r24hmh0q.js";
21
21
 
@@ -4,9 +4,9 @@ import {
4
4
  command,
5
5
  runner,
6
6
  script
7
- } from "./index-phj3ewxv.js";
8
- import"./index-0t7pwff2.js";
9
- import"./index-61keag0s.js";
7
+ } from "./index-en4zpzdm.js";
8
+ import"./index-s6nk9815.js";
9
+ import"./index-67546d0j.js";
10
10
  import"./index-6pz1j0zj.js";
11
11
  import"./index-r24hmh0q.js";
12
12
 
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  RepairRunner
4
- } from "./index-81epkybm.js";
5
- import"./index-eay4t1te.js";
6
- import"./index-2v10yr8g.js";
4
+ } from "./index-xjkjcbhd.js";
5
+ import"./index-xdf6rxyt.js";
6
+ import"./index-ckywhpvp.js";
7
7
  import {
8
8
  Workspace,
9
9
  command,
10
10
  script
11
- } from "./index-phj3ewxv.js";
12
- import"./index-0t7pwff2.js";
13
- import"./index-61keag0s.js";
11
+ } from "./index-en4zpzdm.js";
12
+ import"./index-s6nk9815.js";
13
+ import"./index-67546d0j.js";
14
14
  import"./index-6pz1j0zj.js";
15
15
  import"./index-r24hmh0q.js";
16
16
 
@@ -100,6 +100,45 @@ class RouteSourceValidator {
100
100
  if (exported.has("metadata") && exported.has("generateMetadata")) {
101
101
  throw new Error(`[route-convention] metadata and generateMetadata cannot both be exported in ${filePath}`);
102
102
  }
103
+ return { devOnly: RouteSourceValidator.#readDevOnly(sourceFile, filePath) };
104
+ }
105
+ static #readDevOnly(sourceFile, filePath) {
106
+ for (const statement of sourceFile.statements) {
107
+ if (!ts.isVariableStatement(statement))
108
+ continue;
109
+ const isExported = ts.getModifiers(statement)?.some((m) => m.kind === ts.SyntaxKind.ExportKeyword) ?? false;
110
+ if (!isExported)
111
+ continue;
112
+ for (const declaration of statement.declarationList.declarations) {
113
+ if (!ts.isIdentifier(declaration.name) || declaration.name.text !== "pageConfig")
114
+ continue;
115
+ const initializer = RouteSourceValidator.#unwrapExpression(declaration.initializer);
116
+ if (!initializer || !ts.isObjectLiteralExpression(initializer))
117
+ continue;
118
+ for (const property of initializer.properties) {
119
+ if (!ts.isPropertyAssignment(property))
120
+ continue;
121
+ const name = property.name;
122
+ const key = ts.isIdentifier(name) ? name.text : ts.isStringLiteral(name) ? name.text : null;
123
+ if (key !== "devOnly")
124
+ continue;
125
+ const value = RouteSourceValidator.#unwrapExpression(property.initializer);
126
+ if (value?.kind === ts.SyntaxKind.TrueKeyword)
127
+ return true;
128
+ if (value?.kind === ts.SyntaxKind.FalseKeyword)
129
+ return false;
130
+ throw new Error(`[route-convention] pageConfig.devOnly must be a literal true or false in ${filePath} \u2014 the build reads it without evaluating the module`);
131
+ }
132
+ }
133
+ }
134
+ return false;
135
+ }
136
+ static #unwrapExpression(expression) {
137
+ let current = expression;
138
+ while (current && (ts.isAsExpression(current) || ts.isSatisfiesExpression(current) || ts.isParenthesizedExpression(current))) {
139
+ current = current.expression;
140
+ }
141
+ return current;
103
142
  }
104
143
  static validateOverridesSourceExports(source, filePath) {
105
144
  const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
@@ -1,19 +1,19 @@
1
1
  // @bun
2
2
  import {
3
3
  ScalarScript
4
- } from "./index-d2e2y85b.js";
4
+ } from "./index-cp26p7qd.js";
5
5
  import"./index-ss469dec.js";
6
6
  import {
7
7
  renderPrimitiveReport
8
- } from "./index-2v10yr8g.js";
9
- import"./index-eqxmxan6.js";
10
- import"./index-5vvwc0cz.js";
8
+ } from "./index-ckywhpvp.js";
9
+ import"./index-ehjhzg5y.js";
10
+ import"./index-nsj2ftxj.js";
11
11
  import {
12
12
  Sys,
13
13
  command
14
- } from "./index-phj3ewxv.js";
15
- import"./index-0t7pwff2.js";
16
- import"./index-61keag0s.js";
14
+ } from "./index-en4zpzdm.js";
15
+ import"./index-s6nk9815.js";
16
+ import"./index-67546d0j.js";
17
17
  import"./index-6pz1j0zj.js";
18
18
  import"./index-r24hmh0q.js";
19
19
 
@@ -67,6 +67,7 @@ local.properties
67
67
  **/public/fallback-*.js
68
68
  **/public/libs
69
69
  **/private/libs
70
+ **/page/**/(libs)
70
71
  **/public/firebase-messaging-sw.js
71
72
 
72
73
  **/android/keystore.properties
@@ -255,6 +255,20 @@ final fallback when no CLI command covers the change.
255
255
  | Use `<a>` tag for internal navigation between pages | Akan.js uses `<Link>` from `akanjs/ui` for client-side navigation — avoids full page reloads. | `import { Link } from "akanjs/ui"` and use `<Link href="/task">...</Link>` |
256
256
  | Name a custom `Endpoint`/`Slice` like a generated CRUD op — `create<Model>`, `update<Model>`, `remove<Model>`, `view<Model>`, `edit<Model>`, `merge<Model>` | These names are already auto-generated. A collision can pass sync/typecheck/build and only fail at runtime. | Pick a distinct verb, e.g. `startTask`/`archiveTask`, never `createTask` for a custom endpoint |
257
257
 
258
+ ## Comments
259
+
260
+ - Never add comments in code by default.
261
+ - Prefer clear names and structure so the code needs no explanation.
262
+ - Do not narrate what the code already says.
263
+ - Do not add JSDoc, section banners, or "why/how" comments for ordinary logic.
264
+ - Comments are allowed only for these purposes:
265
+ 1. `TODO` — unfinished work that must be tracked in-code
266
+ 2. `FIXME` — known broken or incorrect behavior that must be fixed
267
+ 3. `XXX` — dangerous / surprising hazard that a reader must not miss
268
+ 4. Deletion caution — warn why removing a line or block would break something non-obvious
269
+ - Keep allowed comments one short line when possible.
270
+ - Match nearby file style: if the surrounding code has few comments, keep it that way.
271
+
258
272
  ## Generated File Tracker (Quick Reference)
259
273
 
260
274
  These files are regenerated by `akan sync` and overwritten on every sync. **Do not hand-edit them.**
@@ -1,31 +1,31 @@
1
1
  // @bun
2
2
  import {
3
3
  WorkflowRunner
4
- } from "./index-1b9f27pm.js";
4
+ } from "./index-2nb022xv.js";
5
5
  import {
6
6
  ScalarScript
7
- } from "./index-d2e2y85b.js";
7
+ } from "./index-cp26p7qd.js";
8
8
  import {
9
9
  PrimitiveScript
10
- } from "./index-m04as81s.js";
10
+ } from "./index-mpj63mbw.js";
11
11
  import {
12
12
  ModuleScript
13
- } from "./index-h6pevatb.js";
14
- import"./index-qacv44mm.js";
13
+ } from "./index-tnngmzgf.js";
14
+ import"./index-f1x6fe2e.js";
15
15
  import"./index-ss469dec.js";
16
- import"./index-eay4t1te.js";
16
+ import"./index-xdf6rxyt.js";
17
17
  import {
18
18
  createWorkflowStepRegistry
19
- } from "./index-2v10yr8g.js";
20
- import"./index-eqxmxan6.js";
21
- import"./index-5vvwc0cz.js";
19
+ } from "./index-ckywhpvp.js";
20
+ import"./index-ehjhzg5y.js";
21
+ import"./index-nsj2ftxj.js";
22
22
  import {
23
23
  Workspace,
24
24
  command,
25
25
  script
26
- } from "./index-phj3ewxv.js";
27
- import"./index-0t7pwff2.js";
28
- import"./index-61keag0s.js";
26
+ } from "./index-en4zpzdm.js";
27
+ import"./index-s6nk9815.js";
28
+ import"./index-67546d0j.js";
29
29
  import"./index-6pz1j0zj.js";
30
30
  import"./index-r24hmh0q.js";
31
31
 
@@ -1,59 +1,59 @@
1
1
  // @bun
2
2
  import {
3
3
  ContextScript
4
- } from "./index-e3b8ms64.js";
5
- import"./index-81epkybm.js";
6
- import"./index-1b9f27pm.js";
4
+ } from "./index-8dsjmcbp.js";
5
+ import"./index-xjkjcbhd.js";
6
+ import"./index-2nb022xv.js";
7
7
  import {
8
8
  CloudScript
9
- } from "./index-eja0sbm6.js";
10
- import"./index-d2e2y85b.js";
11
- import"./index-m04as81s.js";
12
- import"./index-h6pevatb.js";
13
- import"./index-qacv44mm.js";
9
+ } from "./index-0wgpfp7t.js";
10
+ import"./index-cp26p7qd.js";
11
+ import"./index-mpj63mbw.js";
12
+ import"./index-tnngmzgf.js";
13
+ import"./index-f1x6fe2e.js";
14
14
  import"./index-ss469dec.js";
15
- import"./index-hk58kr1m.js";
15
+ import"./index-smt4re0s.js";
16
16
  import {
17
17
  AgentScript
18
- } from "./index-q4sc46ec.js";
19
- import"./index-eay4t1te.js";
20
- import"./index-2v10yr8g.js";
21
- import"./index-eqxmxan6.js";
18
+ } from "./index-79v9jwqe.js";
19
+ import"./index-xdf6rxyt.js";
20
+ import"./index-ckywhpvp.js";
21
+ import"./index-ehjhzg5y.js";
22
22
  import {
23
23
  getLatestPackageVersion,
24
24
  getNpmRegistryUrl
25
- } from "./index-zw4aqvwh.js";
25
+ } from "./index-t5rn8q9f.js";
26
26
  import {
27
27
  GlobalConfig
28
- } from "./index-5vvwc0cz.js";
28
+ } from "./index-nsj2ftxj.js";
29
29
  import {
30
30
  ApplicationScript
31
- } from "./index-n2mp0f48.js";
31
+ } from "./index-31183bxt.js";
32
32
  import"./index-76rn3g2c.js";
33
33
  import {
34
34
  LibraryScript
35
- } from "./index-3a4vntr0.js";
35
+ } from "./index-n08vr4hh.js";
36
36
  import {
37
37
  PackageScript
38
- } from "./index-p9f1rpbp.js";
38
+ } from "./index-31e8cwjq.js";
39
39
  import {
40
40
  Exec,
41
41
  Workspace,
42
42
  command,
43
43
  runner,
44
44
  script
45
- } from "./index-phj3ewxv.js";
45
+ } from "./index-en4zpzdm.js";
46
46
  import"./index-fgc8r6dj.js";
47
47
  import {
48
48
  AppExecutor,
49
49
  LibExecutor,
50
50
  PkgExecutor,
51
51
  WorkspaceExecutor
52
- } from "./index-0t7pwff2.js";
53
- import"./index-x53a5nya.js";
52
+ } from "./index-s6nk9815.js";
53
+ import"./index-46tjzh6s.js";
54
54
  import {
55
55
  FileSys
56
- } from "./index-61keag0s.js";
56
+ } from "./index-67546d0j.js";
57
57
  import"./index-bjpxzr6s.js";
58
58
  import"./index-6pz1j0zj.js";
59
59
  import"./index-r24hmh0q.js";