@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.
- package/.build-stamp +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/{abstractCompactor-e5yq60qz.js → abstractCompactor-20e0cwbs.js} +2 -2
- package/{agent.command-yv00p0s0.js → agent.command-e835fjem.js} +8 -7
- package/{application.command-0qsczf4k.js → application.command-sjtbk6tr.js} +6 -5
- package/{applicationBuildRunner-ct2pxyvw.js → applicationBuildRunner-7gnfz7ww.js} +6 -7
- package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-93nzdfsy.js} +1 -1
- package/buildBatch.proc.js +5 -4
- package/{capacitorApp-4r9sm3qg.js → capacitorApp-qv7g3dp2.js} +29 -26
- package/{cloud.command-dxfv18sa.js → cloud.command-y0e4eyqz.js} +10 -9
- package/{context.command-8d9e3k6b.js → context.command-vn87jb08.js} +16 -15
- package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
- package/getDirname-ka11hm7e.js +8 -0
- package/{guideline.command-3jbkxzh6.js → guideline.command-s4hn2bsy.js} +7 -6
- package/guidelines/conventions/conventions.generate.json +25 -0
- package/guidelines/conventions/conventions.instruction.md +986 -0
- package/guidelines/cssRule/cssRule.instruction.md +7 -0
- package/guidelines/framework/framework.instruction.md +1 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +972 -0
- package/incrementalBuilder.proc.js +6 -5
- package/{index-1pvex4az.js → index-0h212yqe.js} +13 -13
- package/index-1577bej2.js +7 -0
- package/{index-k95xkh4p.js → index-33zce8gt.js} +8 -4
- package/{index-2q1f5j9k.js → index-3dp7x6rc.js} +3 -3
- package/{index-7c6k4yvg.js → index-73rnbwgg.js} +15 -7
- package/{index-e16gnn26.js → index-8d2sv6pw.js} +13 -13
- package/{index-hgna5rjy.js → index-8vkkm7v0.js} +124 -65
- package/{index-bekddz9q.js → index-9jsnb4vw.js} +4 -4
- package/{index-nm6wghb6.js → index-becx1t0k.js} +6 -6
- package/{index-a00jg8x8.js → index-g9e2fhw2.js} +49 -32
- package/{index-pyt2b4nw.js → index-hg0qvhmx.js} +152 -241
- package/{index-tdbas9r0.js → index-j37qq1f2.js} +1 -1
- package/{index-ej426mcr.js → index-k6fvbcj1.js} +37 -6
- package/{index-yzmhasdb.js → index-mykmf6wd.js} +8 -8
- package/{index-t3723f99.js → index-mz5jtaq7.js} +86 -17
- package/{index-8hsbnyes.js → index-n706txcv.js} +5 -3
- package/{index-bbkek1bp.js → index-qc0tnhs2.js} +1 -1
- package/{index-rh16j3c7.js → index-qnv0aqmm.js} +12 -8
- package/{index-0cj2zxbm.js → index-sh01r3pm.js} +1 -1
- package/{index-zasydjxd.js → index-t71zvmt9.js} +9 -11
- package/{index-rzwcpcc3.js → index-tsmjxph2.js} +1 -1
- package/{index-ec09pws3.js → index-x33gnap3.js} +4 -4
- package/{index-mr5s7mqd.js → index-xyrb7pk5.js} +3 -3
- package/index.js +20 -19
- package/{library.command-ebdj1vnm.js → library.command-v5cyaw9t.js} +5 -4
- package/{localRegistry.command-gb178ne8.js → localRegistry.command-53t758pt.js} +9 -8
- package/{module.command-9c1bnsx4.js → module.command-pq6w84xg.js} +9 -8
- package/{package.command-t93p4jkj.js → package.command-qkcs60ts.js} +5 -4
- package/package.json +3 -4
- package/{page.command-k3k0meh2.js → page.command-qj5bfnh9.js} +5 -4
- package/{primitive.command-de6nktdt.js → primitive.command-bw0nes6x.js} +10 -9
- package/{quality.command-z5kth2wa.js → quality.command-f8drhx6c.js} +11 -41
- package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
- package/{repair.command-ehf2g112.js → repair.command-mzwtejpk.js} +7 -6
- package/{routeSourceValidator-cncd92fv.js → routeSourceValidator-7fycdqyv.js} +3 -39
- package/{scalar.command-7a2jtv33.js → scalar.command-rm6k3c65.js} +8 -7
- package/templates/app/env/env.server.debug.ts.template +1 -5
- package/templates/app/env/env.server.develop.ts.template +1 -5
- package/templates/app/env/env.server.local.ts.template +1 -5
- package/templates/app/env/env.server.main.ts.template +1 -5
- package/templates/app/page/styles.css.template +3 -3
- package/templates/appSample/srvkit/AuthGuard.ts +9 -5
- package/templates/appSample/srvkit/SessionInternalArg.ts +4 -3
- package/templates/crudPages/[__model__Id]/edit/page.tsx +1 -1
- package/templates/crudPages/new/page.tsx +1 -1
- package/templates/crudSinglePage/page.tsx +1 -1
- package/templates/env/_env.server.type.ts +7 -5
- package/templates/lib/db.ts +1 -1
- package/templates/lib/dict.ts +1 -1
- package/templates/lib/sig.ts +1 -1
- package/templates/lib/srv.ts +6 -2
- package/templates/lib/useClient.ts +9 -3
- package/templates/module/__Model__.Util.tsx +1 -1
- package/templates/module/__Model__.Zone.tsx +3 -5
- package/templates/workspaceRoot/AGENTS.md.template +0 -963
- package/templates/workspaceRoot/CLAUDE.md.template +19 -0
- package/templates/workspaceRoot/biome.json.template +4 -198
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +4 -1
- package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/{workflow.command-e0tt0vk2.js → workflow.command-g2cgcgxn.js} +15 -14
- package/{workspace.command-fpda0evj.js → workspace.command-f7jerqb2.js} +69 -51
- package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
- package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -33
- package/templates/workspaceRoot/.cursor/rules/application-test-commands.mdc.template +0 -16
- package/templates/workspaceRoot/.cursor/rules/change-scope.mdc.template +0 -12
- package/templates/workspaceRoot/.cursor/rules/client-server-boundaries.mdc.template +0 -18
- package/templates/workspaceRoot/.cursor/rules/coding-comments.mdc.template +0 -25
- package/templates/workspaceRoot/.cursor/rules/coding-style.mdc.template +0 -44
- package/templates/workspaceRoot/.cursor/rules/domain-module-conventions.mdc.template +0 -17
- package/templates/workspaceRoot/.cursor/rules/format-lint.mdc.template +0 -12
- package/templates/workspaceRoot/.cursor/rules/lint-enforced-rules.mdc.template +0 -18
- package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -61
- package/templates/workspaceRoot/.cursor/rules/naming-conventions.mdc.template +0 -15
- package/templates/workspaceRoot/.cursor/rules/react-component-style.mdc.template +0 -21
- package/templates/workspaceRoot/.cursor/rules/repo-overview.mdc.template +0 -17
- package/templates/workspaceRoot/.cursor/rules/scalar-modeling.mdc.template +0 -58
- package/templates/workspaceRoot/.cursor/rules/secrets-and-env.mdc.template +0 -13
- package/templates/workspaceRoot/.cursor/rules/service-signal-conventions.mdc.template +0 -83
- package/templates/workspaceRoot/.cursor/rules/srvkit-adapters-and-guards.mdc.template +0 -50
- package/templates/workspaceRoot/.cursor/rules/ssr-first.mdc.template +0 -59
- package/templates/workspaceRoot/.cursor/rules/typescript-imports.mdc.template +0 -16
- /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
|
-
|
|
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
|
|
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
|
-
|
|
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}
|
|
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}
|
|
40
|
+
return <Load.View view={view} renderView={(${dict.model}) => <${dict.Model}.View.General ${dict.model}={${dict.model}} />} />;
|
|
43
41
|
};
|
|
44
42
|
`,
|
|
45
43
|
};
|