@akanjs/cli 3.0.0-alpha.3 → 3.0.0-alpha.31

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 (105) 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-20e0cwbs.js} +2 -2
  5. package/{agent.command-yv00p0s0.js → agent.command-e835fjem.js} +8 -7
  6. package/{application.command-0qsczf4k.js → application.command-sjtbk6tr.js} +6 -5
  7. package/{applicationBuildRunner-ct2pxyvw.js → applicationBuildRunner-7gnfz7ww.js} +6 -7
  8. package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-93nzdfsy.js} +1 -1
  9. package/buildBatch.proc.js +5 -4
  10. package/{capacitorApp-4r9sm3qg.js → capacitorApp-qv7g3dp2.js} +29 -26
  11. package/{cloud.command-dxfv18sa.js → cloud.command-y0e4eyqz.js} +10 -9
  12. package/{context.command-8d9e3k6b.js → context.command-vn87jb08.js} +16 -15
  13. package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
  14. package/getDirname-ka11hm7e.js +8 -0
  15. package/{guideline.command-3jbkxzh6.js → guideline.command-s4hn2bsy.js} +7 -6
  16. package/guidelines/conventions/conventions.generate.json +25 -0
  17. package/guidelines/conventions/conventions.instruction.md +986 -0
  18. package/guidelines/cssRule/cssRule.instruction.md +7 -0
  19. package/guidelines/framework/framework.instruction.md +1 -0
  20. package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
  21. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +972 -0
  22. package/incrementalBuilder.proc.js +6 -5
  23. package/{index-1pvex4az.js → index-0h212yqe.js} +13 -13
  24. package/index-1577bej2.js +7 -0
  25. package/{index-k95xkh4p.js → index-33zce8gt.js} +8 -4
  26. package/{index-2q1f5j9k.js → index-3dp7x6rc.js} +3 -3
  27. package/{index-7c6k4yvg.js → index-73rnbwgg.js} +15 -7
  28. package/{index-e16gnn26.js → index-8d2sv6pw.js} +13 -13
  29. package/{index-hgna5rjy.js → index-8vkkm7v0.js} +124 -65
  30. package/{index-bekddz9q.js → index-9jsnb4vw.js} +4 -4
  31. package/{index-nm6wghb6.js → index-becx1t0k.js} +6 -6
  32. package/{index-a00jg8x8.js → index-g9e2fhw2.js} +49 -32
  33. package/{index-pyt2b4nw.js → index-hg0qvhmx.js} +152 -241
  34. package/{index-tdbas9r0.js → index-j37qq1f2.js} +1 -1
  35. package/{index-ej426mcr.js → index-k6fvbcj1.js} +37 -6
  36. package/{index-yzmhasdb.js → index-mykmf6wd.js} +8 -8
  37. package/{index-t3723f99.js → index-mz5jtaq7.js} +86 -17
  38. package/{index-8hsbnyes.js → index-n706txcv.js} +5 -3
  39. package/{index-bbkek1bp.js → index-qc0tnhs2.js} +1 -1
  40. package/{index-rh16j3c7.js → index-qnv0aqmm.js} +12 -8
  41. package/{index-0cj2zxbm.js → index-sh01r3pm.js} +1 -1
  42. package/{index-zasydjxd.js → index-t71zvmt9.js} +9 -11
  43. package/{index-rzwcpcc3.js → index-tsmjxph2.js} +1 -1
  44. package/{index-ec09pws3.js → index-x33gnap3.js} +4 -4
  45. package/{index-mr5s7mqd.js → index-xyrb7pk5.js} +3 -3
  46. package/index.js +20 -19
  47. package/{library.command-ebdj1vnm.js → library.command-v5cyaw9t.js} +5 -4
  48. package/{localRegistry.command-gb178ne8.js → localRegistry.command-53t758pt.js} +9 -8
  49. package/{module.command-9c1bnsx4.js → module.command-pq6w84xg.js} +9 -8
  50. package/{package.command-t93p4jkj.js → package.command-qkcs60ts.js} +5 -4
  51. package/package.json +3 -4
  52. package/{page.command-k3k0meh2.js → page.command-qj5bfnh9.js} +5 -4
  53. package/{primitive.command-de6nktdt.js → primitive.command-bw0nes6x.js} +10 -9
  54. package/{quality.command-z5kth2wa.js → quality.command-f8drhx6c.js} +11 -41
  55. package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
  56. package/{repair.command-ehf2g112.js → repair.command-mzwtejpk.js} +7 -6
  57. package/{routeSourceValidator-cncd92fv.js → routeSourceValidator-7fycdqyv.js} +3 -39
  58. package/{scalar.command-7a2jtv33.js → scalar.command-rm6k3c65.js} +8 -7
  59. package/templates/app/env/env.server.debug.ts.template +1 -5
  60. package/templates/app/env/env.server.develop.ts.template +1 -5
  61. package/templates/app/env/env.server.local.ts.template +1 -5
  62. package/templates/app/env/env.server.main.ts.template +1 -5
  63. package/templates/app/page/styles.css.template +3 -3
  64. package/templates/appSample/srvkit/AuthGuard.ts +9 -5
  65. package/templates/appSample/srvkit/SessionInternalArg.ts +4 -3
  66. package/templates/crudPages/[__model__Id]/edit/page.tsx +1 -1
  67. package/templates/crudPages/new/page.tsx +1 -1
  68. package/templates/crudSinglePage/page.tsx +1 -1
  69. package/templates/env/_env.server.type.ts +7 -5
  70. package/templates/lib/db.ts +1 -1
  71. package/templates/lib/dict.ts +1 -1
  72. package/templates/lib/sig.ts +1 -1
  73. package/templates/lib/srv.ts +6 -2
  74. package/templates/lib/useClient.ts +9 -3
  75. package/templates/module/__Model__.Util.tsx +1 -1
  76. package/templates/module/__Model__.Zone.tsx +3 -5
  77. package/templates/workspaceRoot/AGENTS.md.template +0 -963
  78. package/templates/workspaceRoot/CLAUDE.md.template +19 -0
  79. package/templates/workspaceRoot/biome.json.template +4 -198
  80. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +4 -1
  81. package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
  82. package/typecheck.proc.js +1 -1
  83. package/{workflow.command-e0tt0vk2.js → workflow.command-g2cgcgxn.js} +15 -14
  84. package/{workspace.command-fpda0evj.js → workspace.command-f7jerqb2.js} +69 -51
  85. package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
  86. package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -33
  87. package/templates/workspaceRoot/.cursor/rules/application-test-commands.mdc.template +0 -16
  88. package/templates/workspaceRoot/.cursor/rules/change-scope.mdc.template +0 -12
  89. package/templates/workspaceRoot/.cursor/rules/client-server-boundaries.mdc.template +0 -18
  90. package/templates/workspaceRoot/.cursor/rules/coding-comments.mdc.template +0 -25
  91. package/templates/workspaceRoot/.cursor/rules/coding-style.mdc.template +0 -44
  92. package/templates/workspaceRoot/.cursor/rules/domain-module-conventions.mdc.template +0 -17
  93. package/templates/workspaceRoot/.cursor/rules/format-lint.mdc.template +0 -12
  94. package/templates/workspaceRoot/.cursor/rules/lint-enforced-rules.mdc.template +0 -18
  95. package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -61
  96. package/templates/workspaceRoot/.cursor/rules/naming-conventions.mdc.template +0 -15
  97. package/templates/workspaceRoot/.cursor/rules/react-component-style.mdc.template +0 -21
  98. package/templates/workspaceRoot/.cursor/rules/repo-overview.mdc.template +0 -17
  99. package/templates/workspaceRoot/.cursor/rules/scalar-modeling.mdc.template +0 -58
  100. package/templates/workspaceRoot/.cursor/rules/secrets-and-env.mdc.template +0 -13
  101. package/templates/workspaceRoot/.cursor/rules/service-signal-conventions.mdc.template +0 -83
  102. package/templates/workspaceRoot/.cursor/rules/srvkit-adapters-and-guards.mdc.template +0 -50
  103. package/templates/workspaceRoot/.cursor/rules/ssr-first.mdc.template +0 -59
  104. package/templates/workspaceRoot/.cursor/rules/typescript-imports.mdc.template +0 -16
  105. /package/{index-r24hmh0q.js → index-yb2wsc7f.js} +0 -0
@@ -1,16 +1,22 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
2
 
3
3
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [key: string]: string } = {}) {
4
+ const isApp = (scanInfo?.type ?? "lib") === "app";
4
5
  return `
5
6
  import { makePageProto, registerClientRuntime } from "akanjs/client";
6
7
  import { FetchClient } from "akanjs/fetch";
7
8
  import * as cnst from "./cnst";
8
- import { getAllDictionary } from "./dict" with { type: "macro" };
9
- import type * as dict from "./dict";
9
+ ${isApp ? `import { getAllDictionary } from "./dict" with { type: "macro" };\n` : ""}import type * as dict from "./dict";
10
10
  import { getSerializedSignal } from "./sig" with { type: "macro" };
11
11
  import type * as signal from "./sig";
12
12
 
13
- const dictionary = process.env.AKAN_PUBLIC_RENDER_ENV === "csr" ? getAllDictionary() : {};
13
+ ${
14
+ isApp
15
+ ? `const dictionary = process.env.AKAN_PUBLIC_RENDER_ENV === "csr" ? getAllDictionary() : {};`
16
+ : `// dict.ts is cumulative, so a lib dictionary is a subset of the mounting app's. Translator state is global,
17
+ // so the app's seed already resolves l() here — seeding again would ship the same payload a second time.
18
+ const dictionary = {};`
19
+ }
14
20
  const pageProto = makePageProto<typeof dict>(dictionary);
15
21
  const fetchProto = FetchClient.build<typeof signal>(cnst, getSerializedSignal(), { Err: pageProto.Err });
16
22
  export const runtime = registerClientRuntime({ ...pageProto, ...fetchProto }, { scope: ${JSON.stringify(scanInfo?.type ?? "lib")} });
@@ -21,7 +21,7 @@ interface RemoveProps {
21
21
  export const Remove = ({ ${dict.model}Id }: RemoveProps) => {
22
22
  const { l } = usePage();
23
23
  return (
24
- <Model.Remove modelId={${dict.model}Id} slice={fetch.slice["${dict.model}"]}>
24
+ <Model.Remove modelId={${dict.model}Id} slice={fetch.slice.${dict.model}}>
25
25
  <BiTrash /> {l("base.remove")}
26
26
  </Model.Remove>
27
27
  );
@@ -12,9 +12,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dic
12
12
  content: `
13
13
  "use client";
14
14
  import { Load } from "akanjs/ui";
15
- // Alias the domain namespace so the Card/View exports below never collide with the model name
16
- // (a model literally named "card" or "view" would otherwise shadow this import).
17
- import { type cnst, ${dict.Model} as ${dict.Model}Domain } from "@${dict.sysType}s/${dict.sysName}/client";
15
+ import { type cnst, ${dict.Model} as ${dict.Model} } from "@${dict.sysType}s/${dict.sysName}/client";
18
16
  import type { ClientInit, ClientView, SliceMeta } from "akanjs/fetch";
19
17
 
20
18
  interface CardProps {
@@ -28,7 +26,7 @@ export const Card = ({ className, init, slice }: CardProps) => {
28
26
  className={className}
29
27
  init={init}
30
28
  renderItem={(${dict.model}) => (
31
- <${dict.Model}Domain.Unit.Card key={${dict.model}.id} href={\`/${dict.model}/\${${dict.model}.id}\`} ${dict.model}={${dict.model}} />
29
+ <${dict.Model}.Unit.Card key={${dict.model}.id} href={\`/${dict.model}/\${${dict.model}.id}\`} ${dict.model}={${dict.model}} />
32
30
  )}
33
31
  />
34
32
  );
@@ -39,7 +37,7 @@ interface ViewProps {
39
37
  view: ClientView<"${dict.model}", cnst.${dict.Model}>;
40
38
  }
41
39
  export const View = ({ view }: ViewProps) => {
42
- return <Load.View view={view} renderView={(${dict.model}) => <${dict.Model}Domain.View.General ${dict.model}={${dict.model}} />} />;
40
+ return <Load.View view={view} renderView={(${dict.model}) => <${dict.Model}.View.General ${dict.model}={${dict.model}} />} />;
43
41
  };
44
42
  `,
45
43
  };