@akanjs/cli 3.2.0-rc.17 → 3.2.0-rc.19
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-18qg03re.js → CodeAgent-q0xkt4at.js} +2 -2
- package/{CodeTui-zkm51zf3.js → CodeTui-n56kpaca.js} +819 -663
- package/TunnelShare-844s9te4.js +18 -0
- package/{agent.command-5k2zegmj.js → agent.command-k07raqft.js} +20 -20
- package/akanCode.js +8 -8
- package/{appExecutor-1bgs9a69.js → appExecutor-xav1zemr.js} +3 -3
- package/{application.command-ge27047n.js → application.command-dv8y8r12.js} +52 -25
- package/{applicationBuildRunner-7skfg8zn.js → applicationBuildRunner-vhx7zq97.js} +9 -10
- package/buildBatch.proc.js +20 -11
- package/{cloud.command-d18qj1v2.js → cloud.command-0vjy3x96.js} +22 -22
- package/cloud.script-jp48r0kw.js +35 -0
- package/{code.command-tz4x5zm6.js → code.command-xc5exq4b.js} +10 -10
- package/{context.command-x1smtm5q.js → context.command-etsat8yk.js} +22 -22
- package/context.runner-e52ak0cx.js +34 -0
- package/{guideline.command-rdcwxf8g.js → guideline.command-zqkntk7b.js} +6 -6
- package/guidelines/agentRule/agentRule.instruction.md +5 -4
- package/guidelines/conventions/core.md +18 -0
- package/guidelines/errorCodes/errorCodes.instruction.md +6 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +4 -2
- package/guidelines/transportRule/transportRule.instruction.md +3 -1
- package/incrementalBuilder.proc.js +559 -409
- package/{index-gh4brxzn.js → index-12js5pj4.js} +1 -1
- package/{index-jfkh776h.js → index-12vv4g80.js} +1 -1
- package/index-4zqebbqb.js +80 -0
- package/{index-er2ja34m.js → index-6bryy19d.js} +500 -422
- package/{index-3641r8q0.js → index-6pzncry1.js} +4 -4
- package/{index-fcrr79gh.js → index-6rrh0ffr.js} +44 -32
- package/{index-nd39rssn.js → index-7jr9mfp2.js} +286 -144
- package/{index-sp331bww.js → index-81qt1jyj.js} +1 -1
- package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
- package/{index-e82xwj3x.js → index-a05ewnnp.js} +1 -1
- package/{index-bjnebzzc.js → index-bxevbjw7.js} +8 -8
- package/{index-vm6pr11y.js → index-c1vym3gx.js} +2 -2
- package/{index-t8tysbxv.js → index-c9hd79py.js} +4 -4
- package/{index-j2eqe3jk.js → index-c9mnfy9r.js} +38 -23
- package/{index-dtpeyts6.js → index-cc9pevta.js} +1 -1
- package/{index-trp7jdr1.js → index-cet2s7xk.js} +7 -6
- package/{index-yr5jv8yd.js → index-dasa0kbj.js} +3 -3
- package/{index-bxqbt5p3.js → index-ddc2zjj5.js} +1 -1
- package/{index-g7e58wz2.js → index-dz7z9n9t.js} +25 -25
- package/{index-z7t6neq1.js → index-e4vna9dn.js} +4 -4
- package/{index-669sg3yp.js → index-ean2tff1.js} +723 -691
- package/{index-ttfz2sc7.js → index-fgp04fh7.js} +6 -6
- package/{index-bzdq8wfw.js → index-g541mhzw.js} +3 -3
- package/{index-t329y8am.js → index-gh741qft.js} +8 -8
- package/{index-d2r762fk.js → index-k51718xz.js} +2136 -2175
- package/{index-39byv35b.js → index-m6r3pvf5.js} +2 -2
- package/{index-emf3wzvh.js → index-my17308p.js} +7 -7
- package/{index-xywq95wk.js → index-nd8bq17n.js} +6 -6
- package/{index-q4e18ne4.js → index-nxcmgqk3.js} +3 -3
- package/{index-b2sptt87.js → index-pkgha3rt.js} +5 -5
- package/{index-s75h0455.js → index-q2t2w996.js} +1 -1
- package/{index-6p02be7n.js → index-qtqhsb33.js} +204 -160
- package/{index-h7yd92c8.js → index-rj2n5kfk.js} +67 -67
- package/{index-1ts8vfsk.js → index-s5gvwvkb.js} +103 -138
- package/{index-neassptx.js → index-sh3yzse2.js} +8 -7
- package/{index-f482h2hj.js → index-syn4vm3y.js} +1 -1
- package/{index-n8mxyy3f.js → index-t00xrkey.js} +1 -1
- package/{index-g56xae1n.js → index-v72mh89f.js} +7 -8
- package/{index-q57rsax4.js → index-wq8pnev4.js} +3 -3
- package/{index-dp7sht3v.js → index-wxr3941g.js} +8 -8
- package/{index-0c8zj1da.js → index-y8mqkhcf.js} +1 -1
- package/{index-9mx3b3zh.js → index-zk1gjk46.js} +4 -4
- package/index.js +27 -27
- package/{libExecutor-hxe5eqfh.js → libExecutor-mr3vxtnr.js} +2 -2
- package/{library.command-83shs8fw.js → library.command-ps9q5t37.js} +7 -7
- package/{localRegistry.command-sz713jg3.js → localRegistry.command-rszxmvd0.js} +21 -21
- package/{module.command-jhhm0nmw.js → module.command-fcybnn1a.js} +10 -10
- package/{package.command-42syy96v.js → package.command-zen3rhye.js} +10 -10
- package/package.json +2 -2
- package/{page.command-jkv29zzs.js → page.command-gwrxymms.js} +7 -7
- package/{pipeline.command-6sg9g4hq.js → pipeline.command-m1brkqqw.js} +6 -6
- package/{pkgExecutor-6p82w5y1.js → pkgExecutor-x51agavp.js} +2 -2
- package/{primitive.command-tt6aq7m9.js → primitive.command-5vkxvvmk.js} +11 -11
- package/{projectTypecheck-wfrz0cxr.js → projectTypecheck-9dzfah37.js} +1 -1
- package/{quality.command-tqar7ss5.js → quality.command-gqry7eas.js} +9 -9
- package/{repair.command-qkcn329t.js → repair.command-qs4ejcrg.js} +10 -10
- package/{routeSourceValidator-8aph1dsr.js → routeSourceValidator-8n6j1vn7.js} +3 -1
- package/{scalar.command-6nvq11ag.js → scalar.command-ny0vchqq.js} +9 -9
- package/skills/akan-scaffold/SKILL.md +1 -1
- package/{subspace.command-dvwds4cv.js → subspace.command-5pxqjgmw.js} +12 -12
- package/templates/biomeForm.ts +1 -1
- package/templates/env/_env.server.type.ts +1 -1
- package/templates/facetIndex/index.ts +2 -37
- package/templates/workspaceRoot/AGENTS.md.template +2 -1
- package/{tunnel.command-h8r69a7v.js → tunnel.command-ndajt0xk.js} +11 -11
- package/{verify.command-ynec8kt2.js → verify.command-m59ashc7.js} +17 -17
- package/{workflow.command-f70fx73a.js → workflow.command-jchqey88.js} +15 -15
- package/{workspace.command-vagjy1q9.js → workspace.command-g0gzxkpd.js} +36 -36
- package/TunnelShare-6t4rwyc0.js +0 -19
- package/cloud.script-0hbhm3mw.js +0 -35
- package/context.runner-vb7jc0k8.js +0 -34
- package/index-dqsc1b5t.js +0 -18
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
execEmoji,
|
|
4
|
+
Executor
|
|
5
|
+
} from "./index-v72mh89f.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 };
|