@akanjs/cli 3.0.0-alpha.99 → 3.0.0-beta.1
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/{abstractCompactor-byytxs22.js → abstractCompactor-mjh5ppsq.js} +1 -1
- package/{agent.command-v1a4746v.js → agent.command-d2gfxfck.js} +5 -5
- package/{application.command-j05fr5jc.js → application.command-pj2m7584.js} +5 -5
- package/{applicationBuildRunner-s4gsk728.js → applicationBuildRunner-kxwbssgn.js} +2 -2
- package/{applicationReleasePackager-28v9vbzk.js → applicationReleasePackager-4yasxwv9.js} +1 -1
- package/buildBatch.proc.js +2 -2
- package/{capacitorApp-8d6d4zkm.js → capacitorApp-36rbr858.js} +2 -2
- package/{cloud.command-r6wvq2rp.js → cloud.command-jshwdq22.js} +9 -9
- package/{context.command-4vdt1aqq.js → context.command-ez8a0zyz.js} +13 -13
- package/{devTui-tnj2hh4f.js → devTui-40ggmd99.js} +85 -84
- package/{devTuiView-xzed2pd6.js → devTuiView-c08ccbat.js} +1 -1
- package/{guideline.command-p92dq6ts.js → guideline.command-xmqwx8zm.js} +11 -7
- package/guidelines/agentRule/agentRule.instruction.md +112 -32
- package/guidelines/conventions/conventions.instruction.md +100 -40
- package/guidelines/mcpRule/mcpRule.generate.json +11 -1
- package/guidelines/mcpRule/mcpRule.instruction.md +296 -53
- package/guidelines/queryRule/queryRule.instruction.md +17 -9
- package/guidelines/ssrRule/ssrRule.instruction.md +15 -13
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +10 -5
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +68 -3
- package/incrementalBuilder.proc.js +1 -1
- package/{index-gq44bqjt.js → index-259dsnz3.js} +2 -2
- package/{index-b9rkcrx8.js → index-2hq52jq3.js} +9 -7
- package/{index-qsq3q8fy.js → index-2tv3fdx4.js} +21 -10
- package/{index-qkk27bk6.js → index-4edzf1gr.js} +4 -4
- package/{index-yza7zkpt.js → index-600zhnve.js} +10 -10
- package/{index-srdssqj7.js → index-7737gxcp.js} +3 -3
- package/{index-zmjppp25.js → index-8pm30m73.js} +5 -5
- package/{index-p5neav9b.js → index-a64esmtb.js} +54 -9
- package/{index-0amdxycf.js → index-fz5q3gd7.js} +3 -3
- package/{index-fc1bh0a7.js → index-gyd220p2.js} +1 -1
- package/{index-5svjba73.js → index-j9yhg404.js} +1 -1
- package/{index-c69j78kk.js → index-kn1h7p1x.js} +1 -1
- package/{index-gtmz74tj.js → index-ktb5njgy.js} +2 -2
- package/{index-znynzt5w.js → index-mak3cd28.js} +1 -1
- package/{index-29sxqfaw.js → index-ne2qy0nk.js} +3 -3
- package/{index-hyywke0f.js → index-pnqbkf5p.js} +1 -1
- package/{index-8p8p0cf8.js → index-rwg2aa4f.js} +3 -3
- package/{index-5wd728df.js → index-v0qh106m.js} +215 -12
- package/{index-7d6vny25.js → index-ws5e0j51.js} +2 -2
- package/{index-1yxtbmbj.js → index-wt7qrtd4.js} +1 -1
- package/{index-gkkdx9kp.js → index-zry5nz81.js} +6 -6
- package/index.js +19 -19
- package/{library.command-s4fszngs.js → library.command-nbsky672.js} +3 -3
- package/{localRegistry.command-fq2w7cgz.js → localRegistry.command-yeq57wjr.js} +8 -8
- package/{module.command-6n7dwvav.js → module.command-29vqzrh8.js} +6 -6
- package/{package.command-gr82ypnr.js → package.command-axv0abmn.js} +3 -3
- package/package.json +2 -2
- package/{page.command-7gvgb3jb.js → page.command-vs9s3zrh.js} +3 -3
- package/{primitive.command-tk5ckw38.js → primitive.command-cbxmqbtc.js} +7 -7
- package/{quality.command-38v81baf.js → quality.command-gmbs7nws.js} +2 -2
- package/{repair.command-5xbwvsxp.js → repair.command-bqsjptsj.js} +5 -5
- package/{routeSourceValidator-ze6x894c.js → routeSourceValidator-apyqw7wk.js} +90 -17
- package/{scalar.command-0epwcr5k.js → scalar.command-6k1vhe9s.js} +5 -5
- package/{subspace.command-e2t36xb2.js → subspace.command-fwjfcts7.js} +7 -5
- package/templates/app/page/_index.tsx +3 -3
- package/templates/app/page/_layout.tsx +31 -32
- package/templates/appSample/page/task/[taskId]/_index.tsx +22 -27
- package/templates/appSample/page/task/[taskId]/edit.tsx +25 -30
- package/templates/appSample/page/task/_index.tsx +3 -7
- package/templates/appSample/page/task/_layout.tsx +4 -15
- package/templates/appSample/page/task/new.tsx +4 -10
- package/templates/crudPages/[__model__Id]/edit/page.tsx +26 -28
- package/templates/crudPages/[__model__Id]/page.tsx +20 -25
- package/templates/crudPages/new/page.tsx +24 -23
- package/templates/crudPages/page.tsx +25 -24
- package/templates/crudSinglePage/page.tsx +25 -24
- package/templates/lib/sig.ts +4 -0
- package/{workflow.command-kphbr7eh.js → workflow.command-nwpcdc8p.js} +10 -10
- package/{workspace.command-ag5hy887.js → workspace.command-8s050m0h.js} +20 -20
|
@@ -10,33 +10,34 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dic
|
|
|
10
10
|
filename: "_index.tsx",
|
|
11
11
|
content: `
|
|
12
12
|
import { type cnst, fetch, usePage, ${dict.Model} } from "@apps/${dict.appName}/client";
|
|
13
|
-
import
|
|
13
|
+
import { page } from "akanjs/client";
|
|
14
14
|
import { Load } from "akanjs/ui";
|
|
15
15
|
|
|
16
|
-
export default
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
export default page()
|
|
17
|
+
.config({ transition: "none" })
|
|
18
|
+
.render(() => {
|
|
19
|
+
const { l } = usePage();
|
|
20
|
+
const ${dict.model}Form: Partial<cnst.${dict.Model}> = {};
|
|
21
|
+
return (
|
|
22
|
+
<div className="container">
|
|
23
|
+
<div className="m-4 mt-8 flex justify-between">
|
|
24
|
+
<div className="flex items-center gap-2 text-primary text-xl">
|
|
25
|
+
+ {l("base.createModel", { model: l("${dict.model}.modelName") })}
|
|
26
|
+
</div>
|
|
24
27
|
</div>
|
|
28
|
+
<Load.Edit
|
|
29
|
+
className="flex flex-col items-center"
|
|
30
|
+
slice={fetch.slice.${dict.model}InPublic}
|
|
31
|
+
edit={${dict.model}Form}
|
|
32
|
+
type="form"
|
|
33
|
+
onCancel="back"
|
|
34
|
+
onSubmit="/${dict.model}"
|
|
35
|
+
>
|
|
36
|
+
<${dict.Model}.Template.General />
|
|
37
|
+
</Load.Edit>
|
|
25
38
|
</div>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
slice={fetch.slice.${dict.model}InPublic}
|
|
29
|
-
edit={${dict.model}Form}
|
|
30
|
-
type="form"
|
|
31
|
-
onCancel="back"
|
|
32
|
-
onSubmit="/${dict.model}"
|
|
33
|
-
>
|
|
34
|
-
<${dict.Model}.Template.General />
|
|
35
|
-
</Load.Edit>
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
export const pageConfig = { transition: "none" } satisfies PageConfig;
|
|
39
|
+
);
|
|
40
|
+
});
|
|
40
41
|
`,
|
|
41
42
|
};
|
|
42
43
|
}
|
|
@@ -10,34 +10,35 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dic
|
|
|
10
10
|
filename: "_index.tsx",
|
|
11
11
|
content: `
|
|
12
12
|
import { ${dict.Model}, fetch, usePage } from "@apps/${dict.appName}/client";
|
|
13
|
-
import
|
|
13
|
+
import { page } from "akanjs/client";
|
|
14
14
|
import { buttonRecipe, Link } from "akanjs/ui";
|
|
15
15
|
|
|
16
|
-
export default
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<div className="
|
|
24
|
-
<div
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
export default page()
|
|
17
|
+
.config({ transition: "none" })
|
|
18
|
+
.render(async () => {
|
|
19
|
+
const { l } = usePage();
|
|
20
|
+
const [{ ${dict.model}InitInPublic }] = await Promise.all([fetch.init${dict.Model}InPublic()]);
|
|
21
|
+
return (
|
|
22
|
+
<div className="container flex flex-col gap-4">
|
|
23
|
+
<div className="mt-5 h-full w-full px-5">
|
|
24
|
+
<div>{l("${dict.model}.modelName")}</div>
|
|
25
|
+
<div className="flex animate-fadeIn items-center gap-4 px-4 pt-4">
|
|
26
|
+
<div className="font-bold text-lg md:text-4xl">${dict.Model}s</div>
|
|
27
|
+
<Link className={buttonRecipe()} href="/${dict.model}/new">
|
|
28
|
+
+ {l("base.createModel", { model: l("${dict.model}.modelName") })}
|
|
29
|
+
</Link>
|
|
30
|
+
</div>
|
|
31
|
+
<div>{l("${dict.model}.modelDesc")}</div>
|
|
32
|
+
<div className="mt-3 flex gap-4 px-6">
|
|
33
|
+
<${dict.Model}.Zone.Card
|
|
34
|
+
className="grid w-full animate-fadeIn grid-cols-1 justify-center gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
|
|
35
|
+
init={${dict.model}InitInPublic}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
35
38
|
</div>
|
|
36
39
|
</div>
|
|
37
|
-
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
export const pageConfig = { transition: "none" } satisfies PageConfig;
|
|
40
|
+
);
|
|
41
|
+
});
|
|
41
42
|
`,
|
|
42
43
|
};
|
|
43
44
|
}
|
|
@@ -10,32 +10,33 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dic
|
|
|
10
10
|
filename: "_index.tsx",
|
|
11
11
|
content: `
|
|
12
12
|
import { ${dict.Model}, fetch, usePage } from "@apps/${dict.appName}/client";
|
|
13
|
-
import
|
|
13
|
+
import { page } from "akanjs/client";
|
|
14
14
|
import { buttonRecipe, Model } from "akanjs/ui";
|
|
15
15
|
|
|
16
|
-
export default
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
className=
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
export default page()
|
|
17
|
+
.config({ transition: "none" })
|
|
18
|
+
.render(async () => {
|
|
19
|
+
const { l } = usePage();
|
|
20
|
+
const [{ ${dict.model}InitInPublic }] = await Promise.all([fetch.init${dict.Model}InPublic()]);
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
<div className="flex animate-fadeIn items-center gap-4 px-4 pt-4">
|
|
24
|
+
<div className="font-bold text-lg md:text-4xl">{l("${dict.model}.modelName")}</div>
|
|
25
|
+
<Model.New
|
|
26
|
+
className={buttonRecipe({ size: "sm", variant: "ghost" })}
|
|
27
|
+
slice={fetch.slice.${dict.model}InPublic}
|
|
28
|
+
renderTitle="id"
|
|
29
|
+
>
|
|
30
|
+
<${dict.Model}.Template.General />
|
|
31
|
+
</Model.New>
|
|
32
|
+
</div>
|
|
33
|
+
<${dict.Model}.Zone.Card
|
|
34
|
+
className="mt-2 grid w-full animate-fadeIn grid-cols-1 justify-center gap-4 md:grid-cols-2 xl:grid-cols-3"
|
|
35
|
+
init={${dict.model}InitInPublic}
|
|
36
|
+
/>
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
});
|
|
39
40
|
`,
|
|
40
41
|
};
|
|
41
42
|
}
|
package/templates/lib/sig.ts
CHANGED
|
@@ -17,6 +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
|
+
import { Err } from "./dict";
|
|
20
21
|
${libs.map((lib) => `import { fetch as ${lib} } from "@libs/${lib}/lib/sig";`).join("\n")}
|
|
21
22
|
|
|
22
23
|
${[...scanInfo.database.entries()]
|
|
@@ -58,6 +59,9 @@ ${serviceModules.map((module) => `export const ${module} = SignalRegistry.regist
|
|
|
58
59
|
export const fetchSignals = [${signalNames.join(", ")}] as const;
|
|
59
60
|
export type Fetch = FetchClientType<typeof fetchSignals>;
|
|
60
61
|
export const fetch = FetchClient.from(...fetchSignals) as unknown as Fetch;
|
|
62
|
+
// A failure restored from another process is this scope's own Err, so a server hop that rethrows one keeps its
|
|
63
|
+
// dictionary key and data instead of answering the original caller with Internal Server Error.
|
|
64
|
+
fetch.setErrorConstructor(Err);
|
|
61
65
|
|
|
62
66
|
export const getSerializedSignal = () => fetch.serializedSignal
|
|
63
67
|
`;
|
|
@@ -3,30 +3,30 @@ import {
|
|
|
3
3
|
Workspace,
|
|
4
4
|
script,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mak3cd28.js";
|
|
7
7
|
import"./index-q0y2jq9j.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-2tv3fdx4.js";
|
|
9
9
|
import"./index-6wwzs1bc.js";
|
|
10
10
|
import {
|
|
11
11
|
createWorkflowStepRegistry
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-gyd220p2.js";
|
|
13
|
+
import"./index-kn1h7p1x.js";
|
|
14
14
|
import {
|
|
15
15
|
ModuleScript
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
16
|
+
} from "./index-8pm30m73.js";
|
|
17
|
+
import"./index-pnqbkf5p.js";
|
|
18
18
|
import"./index-h7yw2z9n.js";
|
|
19
19
|
import {
|
|
20
20
|
PrimitiveScript
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-4edzf1gr.js";
|
|
22
22
|
import {
|
|
23
23
|
ScalarScript
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-rwg2aa4f.js";
|
|
25
25
|
import"./index-by5gpp8x.js";
|
|
26
|
-
import"./index-
|
|
26
|
+
import"./index-ktb5njgy.js";
|
|
27
27
|
import {
|
|
28
28
|
WorkflowRunner
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-7737gxcp.js";
|
|
30
30
|
|
|
31
31
|
// pkgs/@akanjs/cli/workflow/workflow.script.ts
|
|
32
32
|
import { Logger } from "akanjs/common";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./index-q0y2jq9j.js";
|
|
5
5
|
import {
|
|
6
6
|
GlobalConfig
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-kn1h7p1x.js";
|
|
8
8
|
import {
|
|
9
9
|
Exec,
|
|
10
10
|
Workspace,
|
|
11
11
|
runner,
|
|
12
12
|
script,
|
|
13
13
|
command
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-mak3cd28.js";
|
|
15
15
|
import {
|
|
16
16
|
extractAgentBlock,
|
|
17
17
|
collectScopeRecipeSources,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
AppExecutor,
|
|
22
22
|
LibExecutor,
|
|
23
23
|
PkgExecutor
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-2tv3fdx4.js";
|
|
25
25
|
import"./index-6wwzs1bc.js";
|
|
26
26
|
import {
|
|
27
27
|
countBlocking,
|
|
@@ -32,41 +32,41 @@ import {
|
|
|
32
32
|
collectRecipeSources2,
|
|
33
33
|
scanRecipes2
|
|
34
34
|
} from "./index-by5gpp8x.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
35
|
+
import"./index-gyd220p2.js";
|
|
36
|
+
import"./index-ktb5njgy.js";
|
|
37
37
|
import"./index-h7yw2z9n.js";
|
|
38
38
|
import {
|
|
39
39
|
AgentScript
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-ne2qy0nk.js";
|
|
41
41
|
import {
|
|
42
42
|
ApplicationScript
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-v0qh106m.js";
|
|
44
44
|
import {
|
|
45
45
|
LibraryScript
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-259dsnz3.js";
|
|
47
47
|
import"./index-hwkygn9s.js";
|
|
48
48
|
import"./index-kcxmv48c.js";
|
|
49
49
|
import {
|
|
50
50
|
PackageScript
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-ws5e0j51.js";
|
|
52
52
|
import {
|
|
53
53
|
getNpmRegistryUrl,
|
|
54
54
|
getLatestPackageVersion
|
|
55
|
-
} from "./index-
|
|
55
|
+
} from "./index-2hq52jq3.js";
|
|
56
56
|
import {
|
|
57
57
|
CloudScript
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-zry5nz81.js";
|
|
59
59
|
import {
|
|
60
60
|
ContextScript
|
|
61
|
-
} from "./index-
|
|
62
|
-
import"./index-
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-
|
|
68
|
-
import"./index-
|
|
69
|
-
import"./index-
|
|
61
|
+
} from "./index-600zhnve.js";
|
|
62
|
+
import"./index-wt7qrtd4.js";
|
|
63
|
+
import"./index-fz5q3gd7.js";
|
|
64
|
+
import"./index-7737gxcp.js";
|
|
65
|
+
import"./index-8pm30m73.js";
|
|
66
|
+
import"./index-pnqbkf5p.js";
|
|
67
|
+
import"./index-4edzf1gr.js";
|
|
68
|
+
import"./index-rwg2aa4f.js";
|
|
69
|
+
import"./index-j9yhg404.js";
|
|
70
70
|
|
|
71
71
|
// pkgs/@akanjs/cli/workspace/workspace.runner.ts
|
|
72
72
|
import path from "path";
|