@akanjs/cli 3.0.0-alpha.7 → 3.0.0-alpha.70
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-pggr92jj.js → agent.command-964bf8qg.js} +9 -7
- package/{application.command-692yap1d.js → application.command-n45n18sc.js} +8 -6
- package/{applicationBuildRunner-ha3y8ew8.js → applicationBuildRunner-af0wtspv.js} +19 -14
- package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-93nzdfsy.js} +1 -1
- package/buildBatch.proc.js +7 -5
- package/{capacitorApp-p0z5yab2.js → capacitorApp-vnvnvdhf.js} +29 -27
- package/{cloud.command-wqfsyzv2.js → cloud.command-kx1bh5yq.js} +12 -10
- package/{context.command-9bxtdn0w.js → context.command-g1a65x6j.js} +17 -15
- package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
- package/getDirname-ka11hm7e.js +8 -0
- package/{guideline.command-nfqahxex.js → guideline.command-xphyhvwh.js} +8 -6
- package/guidelines/agentRule/agentRule.generate.json +31 -0
- package/guidelines/agentRule/agentRule.instruction.md +525 -0
- package/guidelines/conventions/conventions.generate.json +25 -0
- package/guidelines/conventions/conventions.instruction.md +1020 -0
- package/guidelines/cssRule/cssRule.instruction.md +7 -0
- package/guidelines/framework/framework.instruction.md +1 -0
- package/guidelines/mcpRule/mcpRule.generate.json +25 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +220 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +638 -0
- package/incrementalBuilder.proc.js +8 -6
- package/{index-azv0xjb5.js → index-0ngvvgry.js} +8 -4
- package/index-1577bej2.js +7 -0
- package/{index-p3f4q532.js → index-4rw4qhe6.js} +14 -13
- package/{index-bjpxzr6s.js → index-5vy2jzar.js} +1 -1
- package/{index-js368gk9.js → index-8gybxemv.js} +6 -6
- package/{index-qb61h0k7.js → index-abyjt72y.js} +333 -540
- package/{index-4hek879p.js → index-bqqts262.js} +1 -1
- package/{index-6rhabeev.js → index-e31ghfp5.js} +5 -3
- package/index-f39512t6.js +255 -0
- package/{index-5pmx7bkg.js → index-fahkq20v.js} +3 -3
- package/{index-xhgtkekh.js → index-hee7egtm.js} +1 -1
- package/{index-7myvn0f0.js → index-j37qq1f2.js} +1 -1
- package/{index-5dw57f0d.js → index-mkn5qagt.js} +14 -14
- package/{index-ztpw544k.js → index-nj3w0r34.js} +3 -3
- package/{index-vg0sj9nc.js → index-nkwmnqwn.js} +257 -97
- package/{index-a1e0j63x.js → index-p681w089.js} +15 -7
- package/{index-j9cxndc0.js → index-qnv0aqmm.js} +9 -6
- package/{index-w6wbb612.js → index-qt4nfr0n.js} +13 -13
- package/{index-bz2sfzzt.js → index-rb65xnw9.js} +4 -4
- package/{index-gex7c8kd.js → index-rbnpe8cp.js} +37 -6
- package/{index-0cj2zxbm.js → index-sh01r3pm.js} +1 -1
- package/{index-gmy45vz2.js → index-v5fdxdre.js} +4 -4
- package/{index-mssqn2sq.js → index-va15r8h5.js} +54 -15
- package/{index-vtj3zps1.js → index-yg3hxk2k.js} +8 -8
- package/{index-2c3e2xh8.js → index-ytaqtc04.js} +1 -1
- package/index.js +21 -19
- package/{library.command-md9715jz.js → library.command-rfpd27yv.js} +6 -4
- package/{localRegistry.command-exkbamyj.js → localRegistry.command-pyxfe0fs.js} +11 -9
- package/{module.command-w5aaddxk.js → module.command-qhaxad0p.js} +10 -8
- package/{package.command-yfkrcy0z.js → package.command-2k22q9nt.js} +6 -4
- package/package.json +4 -5
- package/{page.command-echbavp4.js → page.command-ymk9dqh4.js} +6 -4
- package/{primitive.command-9fbhspw2.js → primitive.command-9k45zpc1.js} +11 -9
- package/{quality.command-3pnt9yep.js → quality.command-bf6vkxe5.js} +192 -97
- package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
- package/{repair.command-carj4vax.js → repair.command-egvvm6xf.js} +8 -6
- package/{routeSourceValidator-e4jmbfcx.js → routeSourceValidator-7fycdqyv.js} +1 -1
- package/{scalar.command-51ryzypc.js → scalar.command-bt1facyj.js} +9 -7
- package/templates/app/env/env.client.debug.ts.template +1 -5
- package/templates/app/env/env.client.develop.ts.template +1 -5
- package/templates/app/env/env.client.local.ts.template +1 -5
- package/templates/app/env/env.client.main.ts.template +1 -5
- package/templates/app/env/env.client.testing.ts.template +1 -5
- package/templates/app/env/env.client.type.ts +2 -6
- 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/main.ts +3 -1
- 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/module/__Model__.Util.tsx +1 -1
- package/templates/module/__Model__.Zone.tsx +3 -5
- package/templates/workspaceRoot/AGENTS.md.template +0 -972
- package/templates/workspaceRoot/CLAUDE.md.template +19 -0
- package/templates/workspaceRoot/biome.json.template +4 -244
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +10 -14
- package/templates/workspaceRoot/docs/GENERATED.md.template +12 -10
- package/templates/workspaceRoot/package.json.template +1 -1
- package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/{workflow.command-91wmvm8k.js → workflow.command-v1n3wg7v.js} +16 -14
- package/{workspace.command-wa10mfd9.js → workspace.command-yvvqvhzz.js} +71 -52
- package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
- package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -34
- 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 -19
- package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -62
- 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 -99
- 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,19 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
RepairRunner
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
4
|
+
} from "./index-nj3w0r34.js";
|
|
5
|
+
import"./index-va15r8h5.js";
|
|
6
|
+
import"./index-ytaqtc04.js";
|
|
7
7
|
import {
|
|
8
8
|
Workspace,
|
|
9
9
|
command,
|
|
10
10
|
script
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
} from "./index-e31ghfp5.js";
|
|
12
|
+
import"./index-nkwmnqwn.js";
|
|
13
|
+
import"./index-f39512t6.js";
|
|
13
14
|
import"./index-mxvakhsm.js";
|
|
14
15
|
import"./index-xys926f2.js";
|
|
16
|
+
import"./index-1577bej2.js";
|
|
15
17
|
import"./index-67546d0j.js";
|
|
16
|
-
import"./index-
|
|
18
|
+
import"./index-yb2wsc7f.js";
|
|
17
19
|
|
|
18
20
|
// pkgs/@akanjs/cli/repair/repair.script.ts
|
|
19
21
|
import { Logger } from "akanjs/common";
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ScalarScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-v5fdxdre.js";
|
|
5
5
|
import"./index-ss469dec.js";
|
|
6
|
-
import"./index-
|
|
6
|
+
import"./index-sh01r3pm.js";
|
|
7
7
|
import {
|
|
8
8
|
renderPrimitiveReport
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-ytaqtc04.js";
|
|
10
|
+
import"./index-j37qq1f2.js";
|
|
11
11
|
import {
|
|
12
12
|
Sys,
|
|
13
13
|
command
|
|
14
|
-
} from "./index-
|
|
15
|
-
import"./index-
|
|
14
|
+
} from "./index-e31ghfp5.js";
|
|
15
|
+
import"./index-nkwmnqwn.js";
|
|
16
|
+
import"./index-f39512t6.js";
|
|
16
17
|
import"./index-mxvakhsm.js";
|
|
18
|
+
import"./index-1577bej2.js";
|
|
17
19
|
import"./index-67546d0j.js";
|
|
18
|
-
import"./index-
|
|
20
|
+
import"./index-yb2wsc7f.js";
|
|
19
21
|
|
|
20
22
|
// pkgs/@akanjs/cli/scalar/scalar.command.ts
|
|
21
23
|
import { Logger, lowerlize } from "akanjs/common";
|
|
@@ -5,12 +5,8 @@ interface Dict {
|
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
|
|
7
7
|
return `
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export type AppClientEnv = ClientEnv & {
|
|
11
|
-
cloudflare?: {
|
|
12
|
-
siteKey: string;
|
|
13
|
-
};
|
|
8
|
+
export type AppClientEnv = {
|
|
9
|
+
// apply public envs here
|
|
14
10
|
};
|
|
15
11
|
`;
|
|
16
12
|
}
|
package/templates/app/main.ts
CHANGED
|
@@ -5,7 +5,9 @@ interface Dict {
|
|
|
5
5
|
}
|
|
6
6
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
7
7
|
return `
|
|
8
|
-
|
|
8
|
+
// Not the \`akanjs/server\` barrel: it re-exports AkanServer, whose graph the gateway never runs. Through the
|
|
9
|
+
// barrel this process evaluates 35MB of SSR renderer and DB driver to spawn children and relay bytes.
|
|
10
|
+
import { AkanApp } from "akanjs/server/akanApp";
|
|
9
11
|
|
|
10
12
|
const run = async () => {
|
|
11
13
|
await new AkanApp().start();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
2
|
@import "akanjs/ui/styles.css";
|
|
3
3
|
|
|
4
|
-
/*
|
|
5
|
-
akanjs/ui/styles.css
|
|
4
|
+
/* The theme system (brand-neutral default palette, @theme inline mapping, dark variant, and runtime
|
|
5
|
+
data-theme switching) is fully provided by akanjs/ui/styles.css. This app works from the import alone.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
To use this app's own brand colors, override the tokens like this:
|
|
8
8
|
|
|
9
9
|
:root,
|
|
10
10
|
[data-theme="dark"] {
|
|
@@ -3,7 +3,7 @@ import type { AppInfo, LibInfo } from "akanjs";
|
|
|
3
3
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { appName: string }) {
|
|
4
4
|
return {
|
|
5
5
|
filename: "AuthGuard.ts",
|
|
6
|
-
content: `import type { Guard, SignalContext } from "akanjs/signal";
|
|
6
|
+
content: `import type { Guard, GuardScope, SignalContext } from "akanjs/signal";
|
|
7
7
|
|
|
8
8
|
// ===== AuthGuard.ts =====
|
|
9
9
|
// Convention: srvkit/ folder — server-only helpers, cannot import from client code.
|
|
@@ -14,10 +14,14 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { a
|
|
|
14
14
|
|
|
15
15
|
export class SignedIn implements Guard {
|
|
16
16
|
static name = "SignedIn";
|
|
17
|
+
// "account" — the verdict reads the caller and nothing about the call, so an MCP catalogue can evaluate it with
|
|
18
|
+
// no arguments and hide what this caller certainly cannot use. Required: "resource" is never evaluated for a
|
|
19
|
+
// listing, so a guard like this one marked that way would filter nothing.
|
|
20
|
+
static scope: GuardScope = "account";
|
|
17
21
|
|
|
18
22
|
canPass(context: SignalContext): boolean {
|
|
19
|
-
|
|
20
|
-
return !!
|
|
23
|
+
// Reads the account the middleware resolved, so the same guard answers over HTTP, a websocket and MCP alike.
|
|
24
|
+
return !!context.get<{ id?: string }>("account");
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
|
|
@@ -25,9 +29,9 @@ export class SignedIn implements Guard {
|
|
|
25
29
|
// Role-based guard: only allow users with a specific role
|
|
26
30
|
// export class IsAdmin implements Guard {
|
|
27
31
|
// static name = "IsAdmin";
|
|
32
|
+
// static scope: GuardScope = "account";
|
|
28
33
|
// canPass(context: SignalContext): boolean {
|
|
29
|
-
//
|
|
30
|
-
// return user?.role === "admin";
|
|
34
|
+
// return context.get<{ role?: string }>("account")?.role === "admin";
|
|
31
35
|
// }
|
|
32
36
|
// }
|
|
33
37
|
`,
|
|
@@ -15,8 +15,9 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { a
|
|
|
15
15
|
|
|
16
16
|
export class CurrentUserId implements InternalArg<string | null> {
|
|
17
17
|
getArg(context: SignalContext): string | null {
|
|
18
|
-
|
|
19
|
-
return
|
|
18
|
+
// \`context.get\` reads what the account middleware resolved, on every transport. Branching on
|
|
19
|
+
// \`getHttpContext()\` would return null for the same caller arriving over a websocket or MCP.
|
|
20
|
+
return context.get<{ id?: string }>("account")?.id ?? null;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -24,7 +25,7 @@ export class CurrentUserId implements InternalArg<string | null> {
|
|
|
24
25
|
// Inject current session language/locale
|
|
25
26
|
// export class CurrentLocale implements InternalArg<string> {
|
|
26
27
|
// getArg(context: SignalContext): string {
|
|
27
|
-
// return context.
|
|
28
|
+
// return context.get<string>("locale") ?? "en";
|
|
28
29
|
// }
|
|
29
30
|
// }
|
|
30
31
|
`,
|
|
@@ -30,7 +30,7 @@ export default async function Page({ params }: PageProps) {
|
|
|
30
30
|
</div>
|
|
31
31
|
<Load.Edit
|
|
32
32
|
className="flex flex-col items-center"
|
|
33
|
-
slice={fetch.slice
|
|
33
|
+
slice={fetch.slice.${dict.model}InPublic}
|
|
34
34
|
edit={${dict.model}Edit}
|
|
35
35
|
type="form"
|
|
36
36
|
onCancel="back"
|
|
@@ -20,7 +20,7 @@ export default async function Page() {
|
|
|
20
20
|
<>
|
|
21
21
|
<div className="animate-fadeIn flex items-center gap-4 px-4 pt-4">
|
|
22
22
|
<div className="text-lg font-bold md:text-4xl">{l("${dict.model}.modelName")}</div>
|
|
23
|
-
<Model.New className="inline-flex items-center gap-2 rounded-field px-3 py-1.5 text-sm transition-colors hover:bg-muted" slice={fetch.slice
|
|
23
|
+
<Model.New className="inline-flex items-center gap-2 rounded-field px-3 py-1.5 text-sm transition-colors hover:bg-muted" slice={fetch.slice.${dict.model}InPublic} renderTitle="id">
|
|
24
24
|
<${dict.Model}.Template.General />
|
|
25
25
|
</Model.New>
|
|
26
26
|
</div>
|
|
@@ -5,12 +5,14 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
|
|
|
5
5
|
const libs = scanInfo.getLibs();
|
|
6
6
|
return {
|
|
7
7
|
filename: "env.server.type.ts",
|
|
8
|
-
content:
|
|
9
|
-
|
|
8
|
+
content: libs.length
|
|
9
|
+
? `
|
|
10
|
+
${libs.map((lib) => `import { env as ${lib}Option } from "@libs/${lib}/server";`).join("\n")}
|
|
10
11
|
|
|
11
12
|
export const libEnv = {
|
|
12
|
-
${libs.
|
|
13
|
-
}
|
|
14
|
-
|
|
13
|
+
${libs.map((lib) => ` ...${lib}Option,`).join("\n")}
|
|
14
|
+
};`
|
|
15
|
+
: `
|
|
16
|
+
export const libEnv = {};`,
|
|
15
17
|
};
|
|
16
18
|
}
|
package/templates/lib/db.ts
CHANGED
|
@@ -13,7 +13,7 @@ ${scalarModules.map((module) => `import { ${capitalize(module)} } from "./__scal
|
|
|
13
13
|
${databaseModules.length ? `import * as cnst from "./cnst";` : ""}
|
|
14
14
|
${databaseModules.map((module) => `import * as ${module}Db from "./${module}/${module}.document";`).join("\n")}
|
|
15
15
|
|
|
16
|
-
${libs.map((lib) => `export
|
|
16
|
+
${libs.map((lib) => `export * as ${lib} from "@libs/${lib}/lib/db";`).join("\n")}
|
|
17
17
|
|
|
18
18
|
${databaseModules.map((module) => `class ${capitalize(module)}Input extends by(cnst.${capitalize(module)}Input) {}`).join("\n")}
|
|
19
19
|
${databaseModules.map((module) => `class ${capitalize(module)}Insight extends by(cnst.${capitalize(module)}Insight) {}`).join("\n")}
|
package/templates/lib/dict.ts
CHANGED
|
@@ -9,7 +9,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
|
|
|
9
9
|
const libs = scanInfo.getLibs();
|
|
10
10
|
return `
|
|
11
11
|
import { makeDictionary, makeTrans, registerScalarTrans, registerServiceTrans, registerModelTrans${libs.length === 0 ? `, dictionary as base` : ""} } from "akanjs/dictionary";
|
|
12
|
-
${libs.length ? libs.map((lib) => `import { dictionary as ${lib} } from "@libs/${lib}/
|
|
12
|
+
${libs.length ? libs.map((lib) => `import { dictionary as ${lib} } from "@libs/${lib}/lib/dict";`).join("\n") : ""}
|
|
13
13
|
|
|
14
14
|
${databaseModules.map((module) => `import * as ${module} from "./${module}/${module}.dictionary";`).join("\n")}
|
|
15
15
|
${serviceModules.map((module) => `import * as ${module} from "./_${module}/${module}.dictionary";`).join("\n")}
|
package/templates/lib/sig.ts
CHANGED
|
@@ -17,7 +17,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
|
|
|
17
17
|
return `
|
|
18
18
|
import { FetchClient, type FetchClientType } from "akanjs/fetch";
|
|
19
19
|
import { SignalRegistry, serverSignal${libs.length === 0 ? ", fetch as base" : ""} } from "akanjs/signal";
|
|
20
|
-
${libs.map((lib) => `import { fetch as ${lib} } from "@libs/${lib}/
|
|
20
|
+
${libs.map((lib) => `import { fetch as ${lib} } from "@libs/${lib}/lib/sig";`).join("\n")}
|
|
21
21
|
|
|
22
22
|
${[...scanInfo.database.entries()]
|
|
23
23
|
.filter(([_, files]) => files.has("signal"))
|
package/templates/lib/srv.ts
CHANGED
|
@@ -13,7 +13,11 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
|
|
|
13
13
|
const libs = scanInfo.getLibs();
|
|
14
14
|
return `
|
|
15
15
|
import { ServiceModel } from "akanjs/service";
|
|
16
|
-
${
|
|
16
|
+
${
|
|
17
|
+
libs.length
|
|
18
|
+
? libs.map((lib) => `import * as ${lib} from "@libs/${lib}/lib/option";`).join("\n")
|
|
19
|
+
: 'import type { BackendEnv } from "akanjs/base";'
|
|
20
|
+
}
|
|
17
21
|
|
|
18
22
|
import * as cnst from "./cnst";
|
|
19
23
|
import * as db from "./db";
|
|
@@ -21,7 +25,7 @@ import * as db from "./db";
|
|
|
21
25
|
${databaseModules.map((module) => `import { ${capitalize(module)}Service } from "./${module}/${module}.service";`).join("\n")}
|
|
22
26
|
${serviceModules.map((module) => `import { ${capitalize(module)}Service } from "./_${module}/${module}.service";`).join("\n")}
|
|
23
27
|
|
|
24
|
-
${libs.map((lib) => `export
|
|
28
|
+
${libs.map((lib) => `export * as ${lib} from "@libs/${lib}/lib/srv";`).join("\n")}
|
|
25
29
|
|
|
26
30
|
${databaseModules.map((module) => `export { ${capitalize(module)}Service } from "./${module}/${module}.service";`).join("\n")}
|
|
27
31
|
${serviceModules.map((module) => `export { ${capitalize(module)}Service } from "./_${module}/${module}.service";`).join("\n")}
|
|
@@ -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
|
};
|