@akanjs/cli 3.2.0-rc.9 → 3.2.1-rc.0
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 +2 -2
- package/CodeAgent-xdw73nbz.js +11 -0
- package/{CodeTui-qstk5vpj.js → CodeTui-0gewm71c.js} +822 -666
- package/README.ko.md +7 -0
- package/README.md +7 -0
- package/TunnelShare-cccfdgbm.js +16 -0
- package/agent.command-g1mj34wz.js +59 -0
- package/akanCode.js +12 -12
- package/appExecutor-rrx10jya.js +11 -0
- package/{application.command-m4rq4wc2.js → application.command-3w4v7t40.js} +84 -40
- package/{applicationBuildRunner-df7rx3ra.js → applicationBuildRunner-y5xbetyz.js} +51 -20
- package/buildBatch.proc.js +31 -16
- package/{cloud.command-a0gy0qq2.js → cloud.command-ph0rz6sw.js} +28 -29
- package/cloud.script-8bs9tp4j.js +30 -0
- package/{code.command-5rsdqw8s.js → code.command-9b967qpg.js} +13 -9
- package/context.command-ndzs5rbf.js +62 -0
- package/context.runner-bmstpng2.js +32 -0
- package/csrArtifactBuilder-gtvff6k7.js +10 -0
- package/{index-qd7xn2bk.js → dependencyScanner-93g8tk0r.js} +7 -6
- package/{devTui-h77zrjv5.js → devTui-rf374y2w.js} +1 -1
- package/{fileSys-zpvt5gtf.js → fileSys-e5mwt73x.js} +1 -1
- package/frameworkGraph-aneq2nwy.js +8 -0
- package/{guideline.command-mffxknbr.js → guideline.command-y8qz9kxy.js} +9 -5
- package/guidelines/agentRule/agentRule.instruction.md +25 -9
- package/guidelines/akanApi/akanApi.instruction.md +6 -4
- package/guidelines/conventions/core.md +23 -5
- package/guidelines/conventions/rules/app.md +4 -1
- package/guidelines/conventions/rules/page.md +5 -4
- package/guidelines/conventions/rules/ts.md +3 -3
- package/guidelines/errorCodes/errorCodes.instruction.md +165 -0
- package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
- package/guidelines/mcpRule/mcpRule.instruction.md +225 -5
- package/guidelines/pageRule/pageRule.instruction.md +10 -1
- package/guidelines/queryRule/queryRule.instruction.md +3 -1
- package/guidelines/runtimeRule/runtimeRule.instruction.md +14 -8
- package/guidelines/transportRule/transportRule.instruction.md +31 -1
- package/incrementalBuilder.proc.js +609 -437
- package/{index-skmtj8rm.js → index-02v45hh9.js} +27 -10
- package/{index-j6gc8n14.js → index-0csk6jqm.js} +11 -9
- package/{index-2r9ff9qm.js → index-0wa5z6rm.js} +2 -2
- package/{index-nmvhjn8c.js → index-0z8sbdme.js} +93 -82
- package/{index-2vgv7fs7.js → index-1c2807kg.js} +727 -693
- package/{index-hj6w4ka1.js → index-1p81ecbz.js} +1 -1
- package/{index-2mf1aen9.js → index-1p9bxjmt.js} +2 -2
- package/{index-an76bdrv.js → index-2kh4xj3m.js} +1 -1
- package/{index-99qvtff2.js → index-2vn0m9z5.js} +5 -5
- package/{index-rp4yf32g.js → index-3569fr49.js} +36 -29
- package/{index-xvk2a75m.js → index-38x8ynrx.js} +25 -25
- package/{index-cmg5ngqa.js → index-3fmzz9sf.js} +20 -20
- package/{index-rfzp4pqs.js → index-45aprybg.js} +3 -3
- package/{index-k92x3vne.js → index-4a1n0nym.js} +1 -1
- package/{index-ra9fvn7s.js → index-4zgm54wf.js} +76 -40
- package/{index-exn38bzx.js → index-652f3bs8.js} +116 -54
- package/{index-grxs6fts.js → index-6gepp8yn.js} +57 -31
- package/{index-vm0dn0mt.js → index-6j351de4.js} +294 -157
- package/{index-w15mg3km.js → index-7ssr7wq4.js} +1 -1
- package/{index-gxav1bjz.js → index-82cmbpxc.js} +9 -9
- package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
- package/{index-gcx48get.js → index-9rymt8d6.js} +2 -2
- package/{index-swwjakt0.js → index-ankyx6dj.js} +14 -18
- package/{index-28x1aszt.js → index-b0t92k71.js} +154 -58
- package/index-b372rck5.js +799 -0
- package/{index-yf9wc28h.js → index-bejy9zyc.js} +1 -1
- package/{index-r0a604h4.js → index-c669pbyb.js} +5 -4
- package/{index-xyn02k0w.js → index-cm9rb480.js} +662 -433
- package/{index-j9790rhk.js → index-d0n78fzc.js} +1635 -1139
- package/{index-hqv34wzq.js → index-dr1carpr.js} +10 -10
- package/index-f2arv0mv.js +30 -0
- package/{index-5radqwn2.js → index-gtydr9qc.js} +12 -12
- package/{index-j6eeh5d7.js → index-j3fqs8rc.js} +5 -5
- package/{index-yckz5t8b.js → index-jdw9m5c4.js} +516 -434
- package/{index-ny2k80mv.js → index-jf4vk1s0.js} +9 -2
- package/{index-x40bdsca.js → index-jg5rwrf7.js} +77 -115
- package/{index-5zwr4n6k.js → index-ktxdfqg5.js} +65 -8
- package/index-mnhrqjjq.js +127 -0
- package/{index-3ghdb7p5.js → index-pc42gxa5.js} +2777 -3676
- package/{index-0hbtve0a.js → index-q8h4eg5y.js} +32 -28
- package/{index-j3v29pq7.js → index-qh81drde.js} +219 -175
- package/{index-b4qq3rq0.js → index-rwgqba9p.js} +1 -1
- package/{index-w8yasvpc.js → index-scfsqen7.js} +2136 -2175
- package/{index-9p260r4e.js → index-trffs83s.js} +538 -250
- package/{index-0gg15zwa.js → index-twjgmryg.js} +6 -6
- package/index-whvhsb5f.js +80 -0
- package/{index-h7hehkw6.js → index-xczjdng6.js} +3 -1
- package/{index-39jz41jb.js → index-xs9a3ddt.js} +3 -3
- package/{index-35j83zkd.js → index-xv3pvdw4.js} +2 -2
- package/{index-34792nh7.js → index-y2g0s9tn.js} +1 -1
- package/{index-43f4h4cm.js → index-ymgsvhc5.js} +7 -8
- package/{index-ygdbn9jn.js → index-zyb0ebm4.js} +1 -1
- package/{index-bns3wcpc.js → index-zyjztrvc.js} +2 -2
- package/index.js +30 -24
- package/libExecutor-nstr00s7.js +10 -0
- package/{library.command-bmd7zc5m.js → library.command-b02aw1hm.js} +12 -5
- package/{localRegistry.command-y6en1599.js → localRegistry.command-3hg1p4aj.js} +24 -24
- package/{module.command-7exfffqw.js → module.command-bd9gz6cv.js} +11 -7
- package/{package.command-adskw2rj.js → package.command-xmr0mxze.js} +11 -10
- package/package.json +8 -8
- package/{page.command-dw01272p.js → page.command-x94qf58g.js} +8 -4
- package/{pipeline.command-0b1r3y5r.js → pipeline.command-n2843k6t.js} +15 -9
- package/pkgExecutor-cka27e3c.js +10 -0
- package/{primitive.command-byw6vc04.js → primitive.command-cs7v376h.js} +12 -8
- package/{projectTypecheck-kkrpq60a.js → projectTypecheck-za2n3nbr.js} +1 -1
- package/{prompter-qrwx1p17.js → prompter-d33wmdpa.js} +2 -2
- package/{quality.command-6rqnhzct.js → quality.command-nqngh1jd.js} +25 -16
- package/{recipeScanner-4b69ybe0.js → recipeScanner-rrx69awy.js} +1 -1
- package/{repair.command-rw5zymak.js → repair.command-v2medwsm.js} +12 -8
- package/{routeSourceValidator-4h947v7c.js → routeSourceValidator-8n6j1vn7.js} +4 -2
- package/{scalar.command-2dyp9nh9.js → scalar.command-61cjmxn1.js} +10 -6
- package/skills/akan-debug/SKILL.md +8 -5
- package/skills/akan-err/SKILL.md +7 -0
- package/skills/akan-mcp/SKILL.md +19 -1
- package/skills/akan-scaffold/SKILL.md +1 -1
- package/skills/akan-validate/SKILL.md +3 -3
- package/{subspace.command-111ynwv1.js → subspace.command-dtv8nfh7.js} +30 -24
- package/templates/app/page/_layout.tsx +13 -0
- package/templates/app/page/styles.css.template +40 -0
- package/templates/appSample/page/_index.tsx +9 -9
- package/templates/appSample/page/_layout.tsx +1 -0
- package/templates/appSample/page/styles.css.template +40 -5
- package/templates/appSample/ui/Recipe/jellyButton.ts +1 -1
- package/templates/biomeForm.ts +1 -1
- package/templates/env/_env.server.type.ts +1 -1
- package/templates/facetIndex/index.ts +2 -37
- package/templates/lib/sig.ts +0 -4
- package/templates/lib/useClient.ts +1 -1
- package/templates/workspaceRoot/.devcontainer/devcontainer.json.template +1 -1
- package/templates/workspaceRoot/AGENTS.md.template +2 -1
- package/templates/workspaceRoot/README.ts +4 -2
- package/{tunnel.command-2gcpfbdj.js → tunnel.command-fmwm5fgb.js} +15 -13
- package/{typeChecker-s640r6c0.js → typeChecker-7jt6abrs.js} +1 -1
- package/typecheck.proc.js +3 -2
- package/{verify.command-djgs86ma.js → verify.command-4f260t53.js} +19 -17
- package/{workflow.command-n0k2mxr5.js → workflow.command-tm5q9xsm.js} +21 -14
- package/{workspace.command-fh1qwxfx.js → workspace.command-75gc280j.js} +56 -54
- package/CodeAgent-x2p3a3e0.js +0 -11
- package/TunnelShare-c4xsfzg5.js +0 -15
- package/agent.command-9et2e27p.js +0 -52
- package/cloud.script-xze4zh7n.js +0 -31
- package/context.command-rk1dwrg4.js +0 -57
- package/context.runner-83ky5m1b.js +0 -30
- package/dependencyScanner-78sq8m4q.js +0 -8
- /package/templates/{appSample → app}/public/fonts/Pretendard-Bold.woff2 +0 -0
- /package/templates/{appSample → app}/public/fonts/Pretendard-Medium.woff2 +0 -0
- /package/templates/{appSample → app}/public/fonts/Pretendard-Regular.woff2 +0 -0
- /package/templates/{appSample → app}/public/fonts/Pretendard-SemiBold.woff2 +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./index-
|
|
3
|
+
script
|
|
4
|
+
} from "./index-652f3bs8.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-1c2807kg.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./index-
|
|
9
|
+
akanMcpInstallTargets
|
|
10
|
+
} from "./index-jdw9m5c4.js";
|
|
11
11
|
import {
|
|
12
12
|
ContextRunner2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-qh81drde.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/context/context.script.ts
|
|
16
16
|
import { Logger } from "akanjs/common";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
execEmoji,
|
|
4
|
+
Executor
|
|
5
|
+
} from "./index-pc42gxa5.js";
|
|
6
|
+
// pkgs/@akanjs/devkit/executors/moduleExecutor.ts
|
|
7
|
+
class ModuleExecutor extends Executor {
|
|
8
|
+
sys;
|
|
9
|
+
emoji = execEmoji.module;
|
|
10
|
+
constructor({ sys, name }) {
|
|
11
|
+
super(name, `${sys.workspace.workspaceRoot}/${sys.type}s/${sys.name}/lib/${name}`);
|
|
12
|
+
this.sys = sys;
|
|
13
|
+
}
|
|
14
|
+
static from(sysExecutor, name) {
|
|
15
|
+
return new ModuleExecutor({ sys: sysExecutor, name });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
// pkgs/@akanjs/devkit/util/errorReport.ts
|
|
19
|
+
import { realpathSync } from "fs";
|
|
20
|
+
import path from "path";
|
|
21
|
+
|
|
22
|
+
class ErrorReport {
|
|
23
|
+
static shownNestedErrors = 20;
|
|
24
|
+
static format(error, workspaceRoot = process.cwd()) {
|
|
25
|
+
return ErrorReport.#format(error, workspaceRoot, []);
|
|
26
|
+
}
|
|
27
|
+
static #format(error, workspaceRoot, ancestors) {
|
|
28
|
+
if (ancestors.includes(error))
|
|
29
|
+
return "[circular]";
|
|
30
|
+
const chain = [...ancestors, error];
|
|
31
|
+
if (error instanceof AggregateError) {
|
|
32
|
+
const shown = error.errors.slice(0, ErrorReport.shownNestedErrors);
|
|
33
|
+
const hidden = error.errors.length - shown.length;
|
|
34
|
+
const nestedMessages = [
|
|
35
|
+
...shown.map((nestedError, index) => ErrorReport.#format(nestedError, workspaceRoot, chain).trim() || `Unknown error ${index + 1}`),
|
|
36
|
+
...hidden > 0 ? [`\u2026and ${hidden} more`] : []
|
|
37
|
+
].map((message) => message.replace(/^/gm, " ")).join(`
|
|
38
|
+
`);
|
|
39
|
+
const message = nestedMessages ? `${error.message}
|
|
40
|
+
${nestedMessages}` : error.message;
|
|
41
|
+
return `${message}${ErrorReport.#causeOf(error, workspaceRoot, chain)}`;
|
|
42
|
+
}
|
|
43
|
+
if (error instanceof Error)
|
|
44
|
+
return `${ErrorReport.#withLocation(error.message, error, workspaceRoot)}${ErrorReport.#causeOf(error, workspaceRoot, chain)}`;
|
|
45
|
+
if (typeof error === "object" && error !== null && "message" in error)
|
|
46
|
+
return ErrorReport.#withLocation(String(error.message), error, workspaceRoot);
|
|
47
|
+
return String(error);
|
|
48
|
+
}
|
|
49
|
+
static #causeOf(error, workspaceRoot, chain) {
|
|
50
|
+
return error.cause ? `
|
|
51
|
+
Caused by: ${ErrorReport.#format(error.cause, workspaceRoot, chain)}` : "";
|
|
52
|
+
}
|
|
53
|
+
static #withLocation(message, error, workspaceRoot) {
|
|
54
|
+
const { position } = error;
|
|
55
|
+
if (!position?.file)
|
|
56
|
+
return message;
|
|
57
|
+
const file = ErrorReport.#relativeToWorkspace(position.file, workspaceRoot);
|
|
58
|
+
const location = position.line > 0 ? `${file}:${position.line}:${position.column}` : file;
|
|
59
|
+
return message.includes(location) ? message : message.replace(/^.*/, (headline) => `${headline} (${location})`);
|
|
60
|
+
}
|
|
61
|
+
static #relativeToWorkspace(file, workspaceRoot) {
|
|
62
|
+
if (!path.isAbsolute(file))
|
|
63
|
+
return file;
|
|
64
|
+
for (const root of [workspaceRoot, ErrorReport.#realpathOf(workspaceRoot)]) {
|
|
65
|
+
const relative = path.relative(root, file);
|
|
66
|
+
if (!relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative))
|
|
67
|
+
return relative.replaceAll(path.sep, "/");
|
|
68
|
+
}
|
|
69
|
+
return file;
|
|
70
|
+
}
|
|
71
|
+
static #realpathOf(dir) {
|
|
72
|
+
try {
|
|
73
|
+
return realpathSync(dir);
|
|
74
|
+
} catch {
|
|
75
|
+
return dir;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { ModuleExecutor, ErrorReport };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// pkgs/@akanjs/devkit/subspaceConfig.ts
|
|
2
|
+
// pkgs/@akanjs/devkit/subspace/subspaceConfig.ts
|
|
3
3
|
class SubspaceConfig {
|
|
4
4
|
static source = "subspace in the workspace root akan.config.ts";
|
|
5
5
|
static defaultPushableBranches = ["main", "develop", "debug"];
|
|
@@ -24,6 +24,8 @@ class SubspaceConfig {
|
|
|
24
24
|
for (const subspace of this.subspaces) {
|
|
25
25
|
if (!subspace.name || !subspace.repo)
|
|
26
26
|
throw new Error(`${SubspaceConfig.source}: every subspace needs a name and a repo`);
|
|
27
|
+
if (subspace.repo.startsWith("-"))
|
|
28
|
+
throw new Error(`${SubspaceConfig.source}: subspace "${subspace.name}" repo "${subspace.repo}" reads as a git option`);
|
|
27
29
|
if (!SubspaceConfig.namePattern.test(subspace.name))
|
|
28
30
|
throw new Error(`${SubspaceConfig.source}: subspace name "${subspace.name}" takes letters, digits, ".", "_" and "-", starting with a letter or digit`);
|
|
29
31
|
if (seenNames.has(subspace.name))
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AkanGraphDiff,
|
|
4
4
|
AkanIndex
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-trffs83s.js";
|
|
6
6
|
import {
|
|
7
7
|
GitRevision
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-zyb0ebm4.js";
|
|
9
9
|
|
|
10
|
-
// pkgs/@akanjs/devkit/workspaceGraph.ts
|
|
10
|
+
// pkgs/@akanjs/devkit/workspace/workspaceGraph.ts
|
|
11
11
|
import { readFile } from "fs/promises";
|
|
12
12
|
import path from "path";
|
|
13
13
|
import ts from "typescript";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
FileSys2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-zyjztrvc.js";
|
|
5
5
|
import {
|
|
6
6
|
ShellOnlyEnv
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-bejy9zyc.js";
|
|
8
8
|
|
|
9
9
|
// pkgs/@akanjs/devkit/codeAgent/agent/akanCodePaths.ts
|
|
10
10
|
import { existsSync } from "fs";
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
binPlatforms,
|
|
4
|
-
ServerEnvProfile,
|
|
5
|
-
AkanAppConfig,
|
|
6
4
|
Executor,
|
|
7
|
-
WorkspaceExecutor
|
|
8
|
-
|
|
5
|
+
WorkspaceExecutor,
|
|
6
|
+
ServerEnvProfile,
|
|
7
|
+
AkanAppConfig
|
|
8
|
+
} from "./index-pc42gxa5.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveAppId,
|
|
11
11
|
targetHtmlFilename
|
|
12
12
|
} from "./index-m9jj544v.js";
|
|
13
|
-
import {
|
|
14
|
-
CsrArtifactBuilder
|
|
15
|
-
} from "./index-xvk2a75m.js";
|
|
16
13
|
import {
|
|
17
14
|
ExitCodeError
|
|
18
|
-
} from "./index-
|
|
15
|
+
} from "./index-652f3bs8.js";
|
|
19
16
|
|
|
20
17
|
// pkgs/@akanjs/devkit/mobile/desktopBin.ts
|
|
21
18
|
import { chmod, mkdir, rename, rm, writeFile } from "fs/promises";
|
|
@@ -1126,12 +1123,14 @@ class NativePublicEnv {
|
|
|
1126
1123
|
return [...new Set([...Object.keys(a), ...Object.keys(b)])].filter((key) => a[key] !== b[key]).sort((x, y) => x < y ? -1 : x > y ? 1 : 0);
|
|
1127
1124
|
}
|
|
1128
1125
|
static async built(app) {
|
|
1126
|
+
const { CsrArtifactBuilder } = await import("./csrArtifactBuilder-gtvff6k7.js");
|
|
1129
1127
|
const file = Bun.file(CsrArtifactBuilder.publicEnvPath(app));
|
|
1130
1128
|
if (!await file.exists())
|
|
1131
1129
|
return null;
|
|
1132
1130
|
return NativePublicEnv.of(await file.json());
|
|
1133
1131
|
}
|
|
1134
1132
|
static async inlined(app) {
|
|
1133
|
+
const { CsrArtifactBuilder } = await import("./csrArtifactBuilder-gtvff6k7.js");
|
|
1135
1134
|
const file = Bun.file(CsrArtifactBuilder.publicEnvPath(app));
|
|
1136
1135
|
const env = await file.exists() ? await file.json() : process.env;
|
|
1137
1136
|
return Object.fromEntries(Object.entries(env).flatMap(([key, value]) => key.startsWith("AKAN_PUBLIC_") && typeof value === "string" ? [[key, value]] : []));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// pkgs/@akanjs/devkit/fileSys.ts
|
|
2
|
+
// pkgs/@akanjs/devkit/util/fileSys.ts
|
|
3
3
|
import { chmodSync, mkdirSync, statSync } from "fs";
|
|
4
4
|
import { lstat, rename, rm, stat } from "fs/promises";
|
|
5
5
|
import nodePath from "path";
|
|
@@ -39,7 +39,7 @@ class FileSys2 {
|
|
|
39
39
|
return await Bun.file(path).write(content);
|
|
40
40
|
}
|
|
41
41
|
static async writeTextAtomic(filePath, content) {
|
|
42
|
-
const temp = `${filePath}.${process.pid}.${
|
|
42
|
+
const temp = `${filePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
43
43
|
try {
|
|
44
44
|
await Bun.write(temp, content);
|
|
45
45
|
await FileSys2.replace(temp, filePath);
|
package/index.js
CHANGED
|
@@ -4,10 +4,14 @@ import {
|
|
|
4
4
|
getTargetMetas,
|
|
5
5
|
getTargetCommandNames,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-652f3bs8.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-pc42gxa5.js";
|
|
10
|
+
import"./index-zyjztrvc.js";
|
|
11
|
+
import"./index-b372rck5.js";
|
|
12
|
+
import"./index-f2arv0mv.js";
|
|
13
|
+
import"./index-mnhrqjjq.js";
|
|
14
|
+
import"./index-whvhsb5f.js";
|
|
11
15
|
|
|
12
16
|
// pkgs/@akanjs/cli/bunVersionGuard.ts
|
|
13
17
|
class BunVersionGuard {
|
|
@@ -23,27 +27,27 @@ import path from "path";
|
|
|
23
27
|
|
|
24
28
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
25
29
|
var commandModules = {
|
|
26
|
-
workspace: async () => (await import("./workspace.command-
|
|
27
|
-
agent: async () => (await import("./agent.command-
|
|
28
|
-
code: async () => (await import("./code.command-
|
|
29
|
-
application: async () => (await import("./application.command-
|
|
30
|
-
library: async () => (await import("./library.command-
|
|
31
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
32
|
-
package: async () => (await import("./package.command-
|
|
33
|
-
module: async () => (await import("./module.command-
|
|
34
|
-
page: async () => (await import("./page.command-
|
|
35
|
-
context: async () => (await import("./context.command-
|
|
36
|
-
cloud: async () => (await import("./cloud.command-
|
|
37
|
-
subspace: async () => (await import("./subspace.command-
|
|
38
|
-
guideline: async () => (await import("./guideline.command-
|
|
39
|
-
scalar: async () => (await import("./scalar.command-
|
|
40
|
-
primitive: async () => (await import("./primitive.command-
|
|
41
|
-
quality: async () => (await import("./quality.command-
|
|
42
|
-
verify: async () => (await import("./verify.command-
|
|
43
|
-
repair: async () => (await import("./repair.command-
|
|
44
|
-
workflow: async () => (await import("./workflow.command-
|
|
45
|
-
pipeline: async () => (await import("./pipeline.command-
|
|
46
|
-
tunnel: async () => (await import("./tunnel.command-
|
|
30
|
+
workspace: async () => (await import("./workspace.command-75gc280j.js")).WorkspaceCommand,
|
|
31
|
+
agent: async () => (await import("./agent.command-g1mj34wz.js")).AgentCommand,
|
|
32
|
+
code: async () => (await import("./code.command-9b967qpg.js")).CodeCommand,
|
|
33
|
+
application: async () => (await import("./application.command-3w4v7t40.js")).ApplicationCommand,
|
|
34
|
+
library: async () => (await import("./library.command-b02aw1hm.js")).LibraryCommand,
|
|
35
|
+
localRegistry: async () => (await import("./localRegistry.command-3hg1p4aj.js")).LocalRegistryCommand,
|
|
36
|
+
package: async () => (await import("./package.command-xmr0mxze.js")).PackageCommand,
|
|
37
|
+
module: async () => (await import("./module.command-bd9gz6cv.js")).ModuleCommand,
|
|
38
|
+
page: async () => (await import("./page.command-x94qf58g.js")).PageCommand,
|
|
39
|
+
context: async () => (await import("./context.command-ndzs5rbf.js")).ContextCommand,
|
|
40
|
+
cloud: async () => (await import("./cloud.command-ph0rz6sw.js")).CloudCommand,
|
|
41
|
+
subspace: async () => (await import("./subspace.command-dtv8nfh7.js")).SubspaceCommand,
|
|
42
|
+
guideline: async () => (await import("./guideline.command-y8qz9kxy.js")).GuidelineCommand,
|
|
43
|
+
scalar: async () => (await import("./scalar.command-61cjmxn1.js")).ScalarCommand,
|
|
44
|
+
primitive: async () => (await import("./primitive.command-cs7v376h.js")).PrimitiveCommand,
|
|
45
|
+
quality: async () => (await import("./quality.command-nqngh1jd.js")).QualityCommand,
|
|
46
|
+
verify: async () => (await import("./verify.command-4f260t53.js")).VerifyCommand,
|
|
47
|
+
repair: async () => (await import("./repair.command-v2medwsm.js")).RepairCommand,
|
|
48
|
+
workflow: async () => (await import("./workflow.command-tm5q9xsm.js")).WorkflowCommand,
|
|
49
|
+
pipeline: async () => (await import("./pipeline.command-n2843k6t.js")).PipelineCommand,
|
|
50
|
+
tunnel: async () => (await import("./tunnel.command-fmwm5fgb.js")).TunnelCommand
|
|
47
51
|
};
|
|
48
52
|
var commandModuleIds = Object.keys(commandModules);
|
|
49
53
|
|
|
@@ -71,6 +75,8 @@ class CommandManifest {
|
|
|
71
75
|
}
|
|
72
76
|
static resolve(manifest, argv) {
|
|
73
77
|
const requested = argv[2];
|
|
78
|
+
if (requested === "--version" || requested === "-V")
|
|
79
|
+
return [];
|
|
74
80
|
if (!manifest || !requested || requested.startsWith("-"))
|
|
75
81
|
return null;
|
|
76
82
|
const id = manifest.byCommand[requested];
|
|
@@ -3,13 +3,17 @@ import {
|
|
|
3
3
|
Lib,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-652f3bs8.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
import"./index-pc42gxa5.js";
|
|
9
|
+
import"./index-zyjztrvc.js";
|
|
10
|
+
import"./index-b372rck5.js";
|
|
11
|
+
import"./index-f2arv0mv.js";
|
|
12
|
+
import"./index-mnhrqjjq.js";
|
|
10
13
|
import {
|
|
11
14
|
LibraryScript
|
|
12
|
-
} from "./index-
|
|
15
|
+
} from "./index-0csk6jqm.js";
|
|
16
|
+
import"./index-whvhsb5f.js";
|
|
13
17
|
|
|
14
18
|
// pkgs/@akanjs/cli/library/library.command.ts
|
|
15
19
|
class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
|
|
@@ -22,7 +26,10 @@ class LibraryCommand extends command("library", [LibraryScript], ({ public: targ
|
|
|
22
26
|
syncLibrary: target({ desc: "Sync dependencies and configuration for a library" }).with(Lib).exec(async function(lib) {
|
|
23
27
|
await this.libraryScript.syncLibrary(lib);
|
|
24
28
|
}),
|
|
25
|
-
libraryStatus: target({
|
|
29
|
+
libraryStatus: target({
|
|
30
|
+
desc: "Report whether each library still matches the source it was installed from",
|
|
31
|
+
readOnly: true
|
|
32
|
+
}).with(Workspace).option("format", String, { desc: "output format", default: "text", enum: ["text", "json"] }).exec(async function(workspace, format) {
|
|
26
33
|
await this.libraryScript.libraryStatus(workspace, format);
|
|
27
34
|
}),
|
|
28
35
|
installLibrary: target({ desc: "Install pre-built library templates (shared, util, etc.)" }).arg("libName", String, { desc: "name of library" }).with(Workspace).exec(async function(libName, workspace) {
|
|
@@ -4,43 +4,43 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-652f3bs8.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
|
-
import"./index-bns3wcpc.js";
|
|
10
9
|
import {
|
|
11
|
-
parseEnvFile
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
parseEnvFile
|
|
11
|
+
} from "./index-pc42gxa5.js";
|
|
12
|
+
import"./index-zyjztrvc.js";
|
|
13
|
+
import"./index-b372rck5.js";
|
|
14
|
+
import"./index-f2arv0mv.js";
|
|
15
|
+
import {
|
|
16
|
+
PkgExecutor2
|
|
17
|
+
} from "./index-mnhrqjjq.js";
|
|
14
18
|
import {
|
|
15
19
|
npmRegistryFromEnv,
|
|
16
20
|
warnIgnoredNpmRegistry,
|
|
17
21
|
getNpmRegistryUrl
|
|
18
|
-
} from "./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
+
} from "./index-jf4vk1s0.js";
|
|
23
|
+
import"./index-6j351de4.js";
|
|
24
|
+
import"./index-ymgsvhc5.js";
|
|
25
|
+
import"./index-2kh4xj3m.js";
|
|
22
26
|
import"./index-m9jj544v.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-j9790rhk.js";
|
|
27
|
-
import"./index-b4qq3rq0.js";
|
|
27
|
+
import"./index-0csk6jqm.js";
|
|
28
|
+
import"./index-d0n78fzc.js";
|
|
29
|
+
import"./index-rwgqba9p.js";
|
|
28
30
|
import {
|
|
29
31
|
ApplicationScript
|
|
30
|
-
} from "./index-
|
|
31
|
-
import"./index-
|
|
32
|
+
} from "./index-b0t92k71.js";
|
|
33
|
+
import"./index-45aprybg.js";
|
|
32
34
|
import {
|
|
33
35
|
CloudRunner
|
|
34
|
-
} from "./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-9p260r4e.js";
|
|
37
|
-
import"./index-cmg5ngqa.js";
|
|
38
|
-
import"./index-5zwr4n6k.js";
|
|
36
|
+
} from "./index-3569fr49.js";
|
|
37
|
+
import"./index-ktxdfqg5.js";
|
|
39
38
|
import {
|
|
40
39
|
PackageScript
|
|
41
|
-
} from "./index-
|
|
42
|
-
import"./index-
|
|
40
|
+
} from "./index-ankyx6dj.js";
|
|
41
|
+
import"./index-9rymt8d6.js";
|
|
43
42
|
import"./index-9bv479q5.js";
|
|
43
|
+
import"./index-whvhsb5f.js";
|
|
44
44
|
|
|
45
45
|
// pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
|
|
46
46
|
import { mkdir, rm } from "fs/promises";
|
|
@@ -163,7 +163,7 @@ class LocalRegistryScript extends script("localRegistry", [
|
|
|
163
163
|
}
|
|
164
164
|
async#preparePackages(workspace, akanPkgs, { test = true } = {}) {
|
|
165
165
|
await this.packageScript.updateWorskpaceRootPackageJson(workspace);
|
|
166
|
-
const pkgs = akanPkgs.map((pkgName) =>
|
|
166
|
+
const pkgs = akanPkgs.map((pkgName) => PkgExecutor2.from(workspace, pkgName));
|
|
167
167
|
if (test)
|
|
168
168
|
for (const pkg of pkgs)
|
|
169
169
|
await this.applicationScript.test(pkg);
|
|
@@ -4,18 +4,22 @@ import {
|
|
|
4
4
|
Module,
|
|
5
5
|
ModuleOrService,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-652f3bs8.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-pc42gxa5.js";
|
|
10
|
+
import"./index-zyjztrvc.js";
|
|
11
|
+
import"./index-b372rck5.js";
|
|
12
|
+
import"./index-f2arv0mv.js";
|
|
13
|
+
import"./index-mnhrqjjq.js";
|
|
11
14
|
import {
|
|
12
15
|
renderPrimitiveReport
|
|
13
|
-
} from "./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
+
} from "./index-1c2807kg.js";
|
|
17
|
+
import"./index-trffs83s.js";
|
|
18
|
+
import"./index-y2g0s9tn.js";
|
|
16
19
|
import {
|
|
17
20
|
ModuleScript
|
|
18
|
-
} from "./index-
|
|
21
|
+
} from "./index-dr1carpr.js";
|
|
22
|
+
import"./index-whvhsb5f.js";
|
|
19
23
|
|
|
20
24
|
// pkgs/@akanjs/cli/module/module.command.ts
|
|
21
25
|
import { Logger, lowerlize } from "akanjs/common";
|
|
@@ -3,21 +3,22 @@ import {
|
|
|
3
3
|
Pkg,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-652f3bs8.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
8
|
+
import"./index-pc42gxa5.js";
|
|
9
|
+
import"./index-zyjztrvc.js";
|
|
10
|
+
import"./index-b372rck5.js";
|
|
11
|
+
import"./index-f2arv0mv.js";
|
|
12
|
+
import"./index-mnhrqjjq.js";
|
|
13
|
+
import"./index-ktxdfqg5.js";
|
|
14
14
|
import {
|
|
15
15
|
PackageScript
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-ankyx6dj.js";
|
|
17
|
+
import"./index-whvhsb5f.js";
|
|
17
18
|
|
|
18
19
|
// pkgs/@akanjs/cli/package/package.command.ts
|
|
19
20
|
class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
|
|
20
|
-
version: target({ desc: "Show version information for all packages" }).with(Workspace).exec(async function(workspace) {
|
|
21
|
+
version: target({ desc: "Show version information for all packages", readOnly: true }).with(Workspace).exec(async function(workspace) {
|
|
21
22
|
await this.packageScript.version(workspace);
|
|
22
23
|
}),
|
|
23
24
|
createPackage: target({ desc: "Create a new package in pkgs/<name>/" }).option("name", String, { desc: "name of package" }).with(Workspace).exec(async function(name, workspace) {
|
|
@@ -32,7 +33,7 @@ class PackageCommand extends command("package", [PackageScript], ({ public: targ
|
|
|
32
33
|
buildPackage: target({ desc: "Build a package for distribution" }).with(Pkg).exec(async function(pkg) {
|
|
33
34
|
await this.packageScript.buildPackage(pkg);
|
|
34
35
|
}),
|
|
35
|
-
verifyDistPackage: target({ desc: "Verify a built dist package with npm pack dry-run" }).with(Pkg).exec(async function(pkg) {
|
|
36
|
+
verifyDistPackage: target({ desc: "Verify a built dist package with npm pack dry-run", readOnly: true }).with(Pkg).exec(async function(pkg) {
|
|
36
37
|
await this.packageScript.verifyDistPackage(pkg);
|
|
37
38
|
}),
|
|
38
39
|
verifyAkanPublishPackages: target({ devOnly: true, desc: "Verify all Akan publish dist packages" }).with(Workspace).exec(async function(workspace) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1-rc.0",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"./package.json": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@earendil-works/pi-agent-core": "1.
|
|
35
|
-
"@earendil-works/pi-ai": "1.
|
|
36
|
-
"@earendil-works/pi-codemode": "1.
|
|
37
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
38
|
-
"@earendil-works/pi-mcp": "1.
|
|
39
|
-
"@earendil-works/pi-tui": "1.
|
|
34
|
+
"@earendil-works/pi-agent-core": "1.5.2",
|
|
35
|
+
"@earendil-works/pi-ai": "1.5.2",
|
|
36
|
+
"@earendil-works/pi-codemode": "1.5.2",
|
|
37
|
+
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
38
|
+
"@earendil-works/pi-mcp": "1.5.2",
|
|
39
|
+
"@earendil-works/pi-tui": "1.5.2",
|
|
40
40
|
"@inquirer/prompts": "^8.7.3",
|
|
41
41
|
"@tailwindcss/node": "^4.3.3",
|
|
42
|
-
"akanjs": "3.2.
|
|
42
|
+
"akanjs": "3.2.1-rc.0",
|
|
43
43
|
"chalk": "^6.0.1",
|
|
44
44
|
"commander": "^15.0.0",
|
|
45
45
|
"dayjs": "^1.11.23",
|
|
@@ -3,13 +3,17 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Module,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-652f3bs8.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
import"./index-pc42gxa5.js";
|
|
9
|
+
import"./index-zyjztrvc.js";
|
|
10
|
+
import"./index-b372rck5.js";
|
|
11
|
+
import"./index-f2arv0mv.js";
|
|
12
|
+
import"./index-mnhrqjjq.js";
|
|
10
13
|
import {
|
|
11
14
|
PageScript
|
|
12
|
-
} from "./index-
|
|
15
|
+
} from "./index-y2g0s9tn.js";
|
|
16
|
+
import"./index-whvhsb5f.js";
|
|
13
17
|
|
|
14
18
|
// pkgs/@akanjs/cli/page/page.command.ts
|
|
15
19
|
class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
|
|
@@ -4,19 +4,24 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-652f3bs8.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
|
+
import {
|
|
10
|
+
AkanAppConfig,
|
|
11
|
+
AkanWorkspaceConfig
|
|
12
|
+
} from "./index-pc42gxa5.js";
|
|
9
13
|
import {
|
|
10
14
|
FileSys2
|
|
11
|
-
} from "./index-
|
|
15
|
+
} from "./index-zyjztrvc.js";
|
|
12
16
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
AppExecutor2
|
|
18
|
+
} from "./index-b372rck5.js";
|
|
19
|
+
import"./index-f2arv0mv.js";
|
|
20
|
+
import"./index-mnhrqjjq.js";
|
|
17
21
|
import {
|
|
18
22
|
resolveMobileTargets
|
|
19
23
|
} from "./index-m9jj544v.js";
|
|
24
|
+
import"./index-whvhsb5f.js";
|
|
20
25
|
|
|
21
26
|
// pkgs/@akanjs/cli/pipeline/pipeline.command.ts
|
|
22
27
|
import { pipelineTriggers as pipelineTriggers2 } from "akanjs/common";
|
|
@@ -1099,7 +1104,7 @@ class PipelineDefinition {
|
|
|
1099
1104
|
}
|
|
1100
1105
|
async#loadNativeTargets(app) {
|
|
1101
1106
|
try {
|
|
1102
|
-
const targets = await resolveMobileTargets(
|
|
1107
|
+
const targets = await resolveMobileTargets(AppExecutor2.from(this.#workspace, app), "all");
|
|
1103
1108
|
return { targets: targets.map(({ name, config }) => ({ name, updates: !!config.updates })) };
|
|
1104
1109
|
} catch (error) {
|
|
1105
1110
|
return { error: toError2(error).message };
|
|
@@ -1119,7 +1124,7 @@ class PipelineDefinition {
|
|
|
1119
1124
|
}
|
|
1120
1125
|
}
|
|
1121
1126
|
async#loadApp(app) {
|
|
1122
|
-
const executor =
|
|
1127
|
+
const executor = AppExecutor2.from(this.#workspace, app);
|
|
1123
1128
|
const file = `apps/${app}/akan.config.ts`;
|
|
1124
1129
|
const sha256 = await PipelineDefinition.#sha256(path.join(executor.cwdPath, "akan.config.ts"));
|
|
1125
1130
|
try {
|
|
@@ -1314,7 +1319,8 @@ class PipelineScript extends script("pipeline", [PipelineRunner]) {
|
|
|
1314
1319
|
class PipelineCommand extends command("pipeline", [PipelineScript], ({ public: target }) => ({
|
|
1315
1320
|
pipeline: target({
|
|
1316
1321
|
desc: "Plan the build pipeline declared in akan.config.ts (the workspace root's and each app's) without running it",
|
|
1317
|
-
failureExitCode: 2
|
|
1322
|
+
failureExitCode: 2,
|
|
1323
|
+
readOnly: true
|
|
1318
1324
|
}).arg("action", String, {
|
|
1319
1325
|
desc: "plan: the JSON plan an executor runs \xB7 validate: check the definitions \xB7 dry-run: show the plan",
|
|
1320
1326
|
default: "dry-run",
|