@akanjs/cli 3.0.0-beta.9 → 3.0.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/CodeAgent-zfab7pkn.js +9 -0
- package/CodeAgentRpcHost-p7h6n2hp.js +7 -0
- package/CodeAgentRpcListener-7p7z5dd7.js +97 -0
- package/CodeTui-0zhnr0pw.js +1457 -0
- package/README.ko.md +83 -28
- package/README.md +70 -27
- package/TunnelShare-cwh9ezsm.js +9 -0
- package/{agent.command-0q17pnrs.js → agent.command-aja6z9mn.js} +8 -9
- package/akanCode.js +102 -0
- package/application.command-049ehgx3.js +246 -0
- package/{applicationBuildRunner-kxwbssgn.js → applicationBuildRunner-75n5rpwp.js} +121 -77
- package/buildBatch.proc.js +120 -32
- package/cloud.command-gw4kqxt8.js +95 -0
- package/cloud.script-c723cpcb.js +20 -0
- package/code.command-x9t6z5nw.js +154 -0
- package/commandManifest.json +1 -1
- package/consoleToStderr-h5bryj94.js +7 -0
- package/context.command-yfbe1rtd.js +48 -0
- package/context.runner-erfe68j5.js +21 -0
- package/{dependencyScanner-shs82ynp.js → dependencyScanner-06z2dmrr.js} +2 -2
- package/{devTui-m1atgkc9.js → devTui-q7k7bakd.js} +122 -40
- package/fileSys-wzzrntkw.js +9 -0
- package/guideline.command-kq9gp690.js +42 -0
- package/guidelines/agentRule/agentRule.instruction.md +154 -26
- package/guidelines/conventions/conventions.instruction.md +138 -48
- package/guidelines/mcpRule/mcpRule.instruction.md +7 -5
- package/guidelines/queryRule/queryRule.instruction.md +21 -7
- package/guidelines/runtimeRule/runtimeRule.instruction.md +291 -6
- package/guidelines/ssrRule/ssrRule.instruction.md +4 -2
- package/guidelines/transportRule/transportRule.instruction.md +10 -8
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +20 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +66 -3
- package/incrementalBuilder.proc.js +564 -109
- package/{index-2tv3fdx4.js → index-150s07n8.js} +1230 -1459
- package/{index-vyvre9en.js → index-25fvrxmy.js} +6 -2
- package/{index-kcxmv48c.js → index-2ahj896a.js} +45 -79
- package/index-2wc41k5w.js +49 -0
- package/index-3hx1z96c.js +87 -0
- package/{index-q0y2jq9j.js → index-52w0fvh8.js} +21 -4
- package/{index-04bk599g.js → index-5g4rkrvt.js} +10 -17
- package/index-5pvxf7z0.js +53 -0
- package/index-5q14pwzd.js +69 -0
- package/{index-vxtad5bd.js → index-66yspb67.js} +5 -8
- package/index-7md2g9vw.js +6 -0
- package/index-7p4c0yer.js +1058 -0
- package/{index-d43r08tf.js → index-8b639zes.js} +77 -150
- package/{index-ktb5njgy.js → index-8kvy8qb4.js} +49 -99
- package/index-94s080qm.js +266 -0
- package/index-9dp031by.js +12 -0
- package/{index-0g7r8xz3.js → index-a37by9hn.js} +114 -232
- package/{index-k2j1hc4r.js → index-b95yhqjr.js} +12 -12
- package/{index-3d9y066c.js → index-bjwxs904.js} +9 -8
- package/{index-2xp0kfkt.js → index-br8pkrk1.js} +37 -25
- package/index-c14nsvnv.js +700 -0
- package/index-c6eggbee.js +123 -0
- package/index-d2242ksy.js +99 -0
- package/{index-92zztqy1.js → index-dy0jx9ay.js} +2 -17
- package/{index-a64esmtb.js → index-fkvb79qe.js} +523 -1022
- package/index-h54yj9wr.js +1119 -0
- package/{index-by5gpp8x.js → index-hj6w4ka1.js} +2 -1
- package/{index-y6n8nmny.js → index-kn5d4jmg.js} +75 -203
- package/index-m3xsb1ms.js +4300 -0
- package/{index-gyd220p2.js → index-mb59b8x0.js} +554 -577
- package/{index-j9yhg404.js → index-mzjb6zp4.js} +4 -7
- package/index-p6pbz9n5.js +25 -0
- package/{index-sj5vxr8f.js → index-qe71g4ze.js} +983 -898
- package/index-rfcz04w9.js +187 -0
- package/{index-hwkygn9s.js → index-senscydg.js} +331 -36
- package/{index-ffvk10zz.js → index-vs8mefhy.js} +107 -241
- package/index-wa5jbxj1.js +760 -0
- package/index-y5ga5w9t.js +2729 -0
- package/{index-9077wzd2.js → index-y7hx1ygz.js} +43 -26
- package/{index-h7yw2z9n.js → index-zzvvc845.js} +8 -14
- package/index.js +23 -22
- package/{library.command-qzzbj6d8.js → library.command-keqjevpp.js} +4 -5
- package/{localRegistry.command-vyrgg4xw.js → localRegistry.command-pydeq5zf.js} +23 -43
- package/{module.command-rq5hq3ax.js → module.command-dkrnqx3v.js} +8 -12
- package/{package.command-d9hd6v9n.js → package.command-wmc0ys5y.js} +6 -7
- package/package.json +15 -7
- package/{page.command-126d56te.js → page.command-tf3erhrv.js} +4 -5
- package/{primitive.command-taxd1538.js → primitive.command-7hqpegj4.js} +9 -23
- package/prompter-76k56b37.js +8 -0
- package/{quality.command-6gsna0a3.js → quality.command-8122axq3.js} +205 -377
- package/{recipeScanner-fpagtgc1.js → recipeScanner-4b69ybe0.js} +1 -1
- package/{repair.command-tq2dgy72.js → repair.command-mcy12h0n.js} +11 -35
- package/{routeSourceValidator-apyqw7wk.js → routeSourceValidator-7ycnfz0e.js} +0 -6
- package/{scalar.command-3bcmrrkv.js → scalar.command-vvvbzttc.js} +7 -11
- package/skills/akan-code/SKILL.md +130 -0
- package/skills/akan-debug/SKILL.md +42 -0
- package/skills/akan-deps/SKILL.md +50 -0
- package/skills/akan-err/SKILL.md +39 -0
- package/skills/akan-module/SKILL.md +45 -0
- package/skills/akan-scaffold/SKILL.md +76 -0
- package/skills/akan-scalar/SKILL.md +52 -0
- package/skills/akan-service/SKILL.md +34 -0
- package/skills/akan-store/SKILL.md +67 -0
- package/skills/akan-ui/SKILL.md +63 -0
- package/skills/akan-validate/SKILL.md +44 -0
- package/{subspace.command-eddzqpx3.js → subspace.command-pzvqfy5h.js} +53 -62
- package/templates/__scalar/__model__/__model__.abstract.md.template +8 -0
- package/templates/app/page/_index.tsx +257 -258
- package/templates/app/page/_layout.tsx +5 -1
- package/templates/app/page/_overrides.tsx +12 -0
- package/templates/app/page/styles.css.template +316 -14
- package/templates/app/public/apple-touch-icon.png +0 -0
- package/templates/app/public/favicon.ico +0 -0
- package/templates/app/public/jelly/cloud.webp +0 -0
- package/templates/app/public/jelly/comet.webp +0 -0
- package/templates/app/public/jelly/moon.webp +0 -0
- package/templates/app/public/jelly/planet.webp +0 -0
- package/templates/app/public/jelly/rocket.webp +0 -0
- package/templates/app/public/jelly/star.webp +0 -0
- package/templates/app/public/jelly/sugar.webp +0 -0
- package/templates/app/public/logo.png +0 -0
- package/templates/app/ui/Recipe/index.ts +9 -0
- package/templates/app/ui/Recipe/jellyButton.ts +63 -0
- package/templates/appSample/lib/__scalar/workHistory/workHistory.abstract.ts +8 -39
- package/templates/appSample/lib/_noti/noti.abstract.ts +6 -29
- package/templates/appSample/lib/task/Task.Unit.tsx +1 -1
- package/templates/appSample/lib/task/Task.Util.tsx +10 -13
- package/templates/appSample/lib/task/Task.View.tsx +2 -2
- package/templates/appSample/lib/task/Task.Zone.tsx +5 -2
- package/templates/appSample/lib/task/task.abstract.ts +12 -32
- package/templates/appSample/lib/task/task.signal.spec.ts +1 -15
- package/templates/appSample/lib/task/task.signal.test.ts +15 -1
- package/templates/appSample/lib/task/task.signal.ts +10 -8
- package/templates/appSample/page/task/[taskId]/_index.tsx +6 -6
- package/templates/appSample/page/task/[taskId]/edit.tsx +5 -4
- package/templates/appSample/page/task/_index.tsx +4 -3
- package/templates/appSample/page/task/_layout.tsx +1 -1
- package/templates/appSample/page/task/new.tsx +5 -4
- package/templates/appSample/srvkit/{AuthGuard.ts → guards.ts} +7 -4
- package/templates/appSample/srvkit/{SessionInternalArg.ts → internalArgs.ts} +6 -4
- package/templates/appSample/ui/GlobalLoading.tsx +2 -1
- package/templates/appSample/ui/QuantityControl.tsx +3 -3
- package/templates/client.ts +7 -30
- package/templates/crudPages/[__model__Id]/edit/page.tsx +2 -1
- package/templates/crudPages/[__model__Id]/page.tsx +2 -1
- package/templates/crudPages/new/page.tsx +2 -1
- package/templates/crudPages/page.tsx +2 -1
- package/templates/crudSinglePage/page.tsx +2 -1
- package/templates/lib/__lib/lib.dictionary.ts +0 -2
- package/templates/lib/__lib/lib.document.ts +0 -2
- package/templates/lib/sig.ts +8 -30
- package/templates/localDev/docker-compose.yaml.template +3 -14
- package/templates/module/__model__.signal.ts +12 -4
- package/templates/pkgRoot/tsconfig.json.template +2 -7
- package/templates/server.ts +1 -3
- package/templates/service/__model__.abstract.md.template +8 -0
- package/templates/workspaceRoot/.gitignore.template +0 -1
- package/templates/workspaceRoot/AGENTS.md.template +6 -0
- package/templates/workspaceRoot/package.json.template +1 -3
- package/tunnel.command-82zz5xnq.js +129 -0
- package/{typeChecker-3xgrzc2v.js → typeChecker-px49mezc.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/workflow.command-y8x3kgjv.js +79 -0
- package/{workspace.command-06wvstgr.js → workspace.command-jvsb7brc.js} +79 -109
- package/abstractCompactor-gmkc0z8j.js +0 -102
- package/application.command-18y0s485.js +0 -204
- package/applicationReleasePackager-4yasxwv9.js +0 -244
- package/capacitorApp-36rbr858.js +0 -12
- package/cloud.command-av97ndh6.js +0 -94
- package/cloud.script-cm11xjdz.js +0 -20
- package/context.command-5v37ef3n.js +0 -81
- package/devTuiView-0hc2emhe.js +0 -9
- package/getDirname-dr3jz1xg.js +0 -7
- package/guideline.command-4pz9g1rt.js +0 -360
- package/guidelines/agentRule/agentRule.generate.json +0 -31
- package/guidelines/componentRule/componentRule.generate.json +0 -31
- package/guidelines/conventions/conventions.generate.json +0 -25
- package/guidelines/cssRule/cssRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.instruction.md +0 -25
- package/guidelines/docSyncRule/docSyncRule.generate.json +0 -31
- package/guidelines/docSyncRule/docSyncRule.instruction.md +0 -25
- package/guidelines/enumConstant/enumConstant.generate.json +0 -31
- package/guidelines/enumConstant/enumConstant.instruction.md +0 -28
- package/guidelines/fieldRule/fieldRule.generate.json +0 -31
- package/guidelines/framework/framework.generate.json +0 -32
- package/guidelines/mcpRule/mcpRule.generate.json +0 -35
- package/guidelines/modelConstant/modelConstant.generate.json +0 -32
- package/guidelines/modelDictionary/modelDictionary.generate.json +0 -32
- package/guidelines/modelDocument/modelDocument.generate.json +0 -31
- package/guidelines/modelService/modelService.generate.json +0 -31
- package/guidelines/modelSignal/modelSignal.generate.json +0 -31
- package/guidelines/modelStore/modelStore.generate.json +0 -31
- package/guidelines/modelTemplate/modelTemplate.generate.json +0 -31
- package/guidelines/modelUnit/modelUnit.generate.json +0 -31
- package/guidelines/modelUtil/modelUtil.generate.json +0 -31
- package/guidelines/modelView/modelView.generate.json +0 -31
- package/guidelines/modelZone/modelZone.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.instruction.md +0 -28
- package/guidelines/moduleOverview/moduleOverview.generate.json +0 -31
- package/guidelines/queryRule/queryRule.generate.json +0 -31
- package/guidelines/recipeRule/recipeRule.generate.json +0 -31
- package/guidelines/runtimeRule/runtimeRule.generate.json +0 -25
- package/guidelines/scalarConstant/scalarConstant.generate.json +0 -32
- package/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -32
- package/guidelines/scalarModule/scalarModule.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -25
- package/guidelines/ssrRule/ssrRule.generate.json +0 -31
- package/guidelines/transportRule/transportRule.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -25
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +0 -24
- package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +0 -33
- package/index-47pj3aee.js +0 -76
- package/index-5ystnsd5.js +0 -841
- package/index-6wwzs1bc.js +0 -7
- package/index-a17x49vg.js +0 -229
- package/index-m0xccmmm.js +0 -228
- package/index-meh558jy.js +0 -65
- package/index-rtxxan88.js +0 -471
- package/index-te54x9zm.js +0 -338
- package/index-w8kmx1b6.js +0 -2176
- package/index-wt7qrtd4.js +0 -1516
- package/templates/__scalar/__model__/__model__.abstract.md +0 -28
- package/templates/module/__model__.abstract.md +0 -28
- package/templates/service/__model__.abstract.md +0 -28
- package/templates/workspaceRoot/patches/react-dom@19.2.7.patch.template +0 -62
- package/workflow.command-gtdnzvbz.js +0 -108
|
@@ -14,25 +14,26 @@ class LibSource {
|
|
|
14
14
|
const relative = file.slice(this.#prefix.length);
|
|
15
15
|
return !LibSource.unhashedDirs.includes(relative.split("/")[0] ?? "");
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
if (file !== `${this.#prefix}package.json`)
|
|
20
|
-
return content;
|
|
21
|
-
const manifest = JSON.parse(content);
|
|
17
|
+
static unstamped(manifestContent) {
|
|
18
|
+
const manifest = JSON.parse(manifestContent);
|
|
22
19
|
delete manifest[LibSource.manifestKey];
|
|
23
20
|
return JSON.stringify(manifest);
|
|
24
21
|
}
|
|
25
|
-
async
|
|
26
|
-
const files = (await this.#lib.workspace.listGitFiles([`libs/${this.#lib.name}`], { untracked: true })).filter((file) => this.#isHashed(file));
|
|
22
|
+
static async hashFiles(files, manifestFile, read) {
|
|
27
23
|
const hasher = new Bun.CryptoHasher("sha256");
|
|
28
24
|
for (const file of files) {
|
|
25
|
+
const content = await read(file);
|
|
29
26
|
hasher.update(file);
|
|
30
27
|
hasher.update("\x00");
|
|
31
|
-
hasher.update(
|
|
28
|
+
hasher.update(file === manifestFile ? LibSource.unstamped(content) : content);
|
|
32
29
|
hasher.update("\x00");
|
|
33
30
|
}
|
|
34
31
|
return hasher.digest("hex").slice(0, 32);
|
|
35
32
|
}
|
|
33
|
+
async computeHash() {
|
|
34
|
+
const files = (await this.#lib.workspace.listGitFiles([`libs/${this.#lib.name}`], { untracked: true })).filter((file) => this.#isHashed(file));
|
|
35
|
+
return await LibSource.hashFiles(files, `${this.#prefix}package.json`, (file) => this.#lib.workspace.readFile(file));
|
|
36
|
+
}
|
|
36
37
|
async read() {
|
|
37
38
|
const manifest = await this.#lib.getPackageJson();
|
|
38
39
|
const akan = manifest[LibSource.manifestKey];
|
|
@@ -2,25 +2,22 @@
|
|
|
2
2
|
import {
|
|
3
3
|
GlobalConfig,
|
|
4
4
|
CloudApi
|
|
5
|
-
} from "./index-
|
|
6
|
-
import {
|
|
7
|
-
PkgExecutor
|
|
8
|
-
} from "./index-2tv3fdx4.js";
|
|
9
|
-
import {
|
|
10
|
-
AiSession
|
|
11
|
-
} from "./index-te54x9zm.js";
|
|
5
|
+
} from "./index-94s080qm.js";
|
|
12
6
|
import {
|
|
13
7
|
script
|
|
14
|
-
} from "./index-
|
|
8
|
+
} from "./index-a37by9hn.js";
|
|
9
|
+
import {
|
|
10
|
+
PkgExecutor
|
|
11
|
+
} from "./index-150s07n8.js";
|
|
15
12
|
import {
|
|
16
13
|
ApplicationScript
|
|
17
|
-
} from "./index-
|
|
14
|
+
} from "./index-qe71g4ze.js";
|
|
18
15
|
import {
|
|
19
16
|
PackageScript
|
|
20
|
-
} from "./index-
|
|
17
|
+
} from "./index-y7hx1ygz.js";
|
|
21
18
|
import {
|
|
22
19
|
CloudRunner
|
|
23
|
-
} from "./index-
|
|
20
|
+
} from "./index-h54yj9wr.js";
|
|
24
21
|
|
|
25
22
|
// pkgs/@akanjs/cli/cloud/cloud.script.ts
|
|
26
23
|
import { Logger } from "akanjs/common";
|
|
@@ -31,16 +28,6 @@ class CloudScript2 extends script("cloud", [CloudRunner, ApplicationScript, Pack
|
|
|
31
28
|
async logout(workspace, host = GlobalConfig.akanCloudHost) {
|
|
32
29
|
await this.cloudRunner.logout(host);
|
|
33
30
|
}
|
|
34
|
-
async setLlm(workspace) {
|
|
35
|
-
await this.cloudRunner.setLlm();
|
|
36
|
-
}
|
|
37
|
-
resetLlm(workspace) {
|
|
38
|
-
this.cloudRunner.resetLlm();
|
|
39
|
-
}
|
|
40
|
-
async ask(question, workspace) {
|
|
41
|
-
const session = new AiSession("general", { workspace, isContinued: true });
|
|
42
|
-
await session.ask(question);
|
|
43
|
-
}
|
|
44
31
|
async downloadEnv(workspace, workspaceId = workspace.getWorkspaceId({ allowEmpty: true }), { host = GlobalConfig.akanCloudHost } = {}) {
|
|
45
32
|
if (workspaceId) {
|
|
46
33
|
await this.login(workspace, host);
|
|
@@ -68,18 +55,43 @@ class CloudScript2 extends script("cloud", [CloudRunner, ApplicationScript, Pack
|
|
|
68
55
|
await this.cloudRunner.uploadEnvByScp(workspace, path);
|
|
69
56
|
return { workspaceId: null, files };
|
|
70
57
|
}
|
|
71
|
-
async deployAkan(workspace, {
|
|
58
|
+
async deployAkan(workspace, {
|
|
59
|
+
test = true,
|
|
60
|
+
registryUrl,
|
|
61
|
+
platforms = []
|
|
62
|
+
} = {}) {
|
|
72
63
|
const akanPkgs = await this.cloudRunner.getAkanPkgs(workspace);
|
|
73
64
|
await this.packageScript.updateWorskpaceRootPackageJson(workspace);
|
|
74
65
|
const pkgs = akanPkgs.map((pkgName) => PkgExecutor.from(workspace, pkgName));
|
|
75
|
-
if (test)
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
if (test) {
|
|
67
|
+
const platformRun = platforms.length ? await this.cloudRunner.startPlatformTests(workspace, platforms, akanPkgs) : null;
|
|
68
|
+
let localFailure = null;
|
|
69
|
+
try {
|
|
70
|
+
for (const pkg of pkgs)
|
|
71
|
+
await this.applicationScript.test(pkg);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
localFailure = error;
|
|
74
|
+
}
|
|
75
|
+
if (platformRun)
|
|
76
|
+
await this.cloudRunner.settlePlatformTests(platformRun, {
|
|
77
|
+
interactive: !localFailure,
|
|
78
|
+
recordStreaks: !localFailure,
|
|
79
|
+
checkDrift: true
|
|
80
|
+
});
|
|
81
|
+
if (localFailure)
|
|
82
|
+
throw localFailure;
|
|
83
|
+
}
|
|
78
84
|
for (const pkg of pkgs)
|
|
79
85
|
await this.packageScript.buildPackage(pkg);
|
|
80
86
|
await this.packageScript.verifyAkanPublishPackages(workspace);
|
|
81
87
|
await this.cloudRunner.deployAkan(workspace, akanPkgs, { registryUrl });
|
|
82
88
|
}
|
|
89
|
+
async testPlatforms(workspace, { platforms, pkgs }) {
|
|
90
|
+
if (!platforms.length)
|
|
91
|
+
throw new Error("No platform to test on \u2014 pass --platforms linux,windows");
|
|
92
|
+
const run = await this.cloudRunner.startPlatformTests(workspace, platforms, pkgs ?? await this.cloudRunner.getAkanPkgs(workspace));
|
|
93
|
+
await this.cloudRunner.settlePlatformTests(run, { interactive: false, recordStreaks: false, checkDrift: false });
|
|
94
|
+
}
|
|
83
95
|
async update(workspace, tag = "latest", { registryUrl } = {}) {
|
|
84
96
|
const spinner = workspace.spinning("Updating Akan.js packages and CLI...");
|
|
85
97
|
await this.cloudRunner.update(workspace, tag, { registryUrl });
|