@akanjs/cli 3.1.1-rc.18 → 3.1.1-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 +1 -1
- package/CodeAgent-rsebcq9c.js +9 -0
- package/{CodeTui-0626gxqd.js → CodeTui-mpybfknz.js} +1 -1
- package/TunnelShare-da9qj2mh.js +14 -0
- package/{agent.command-hpza0pg9.js → agent.command-xc1mf4yz.js} +13 -13
- package/akanCode.js +7 -5
- package/{application.command-3a7q1hs2.js → application.command-frkm7n6t.js} +43 -11
- package/{applicationBuildRunner-s7yt71j4.js → applicationBuildRunner-r9nvz9ms.js} +5 -5
- package/buildBatch.proc.js +5 -5
- package/{cloud.command-4vg0pcea.js → cloud.command-gakbzmdj.js} +16 -15
- package/cloud.script-1krw7gjb.js +26 -0
- package/{code.command-fbntb67p.js → code.command-pvfczhpy.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-31rm54v0.js → context.command-cp6fstk3.js} +16 -16
- package/context.runner-hwq8pwrg.js +26 -0
- package/{devTui-q7k7bakd.js → devTui-evr3b35y.js} +1 -1
- package/{guideline.command-cv3by2ng.js → guideline.command-761yyxqb.js} +2 -2
- package/guidelines/conventions/core.md +4 -2
- package/incrementalBuilder.proc.js +3 -3
- package/{index-zre4m2ce.js → index-1qmfdbjf.js} +4 -4
- package/{index-rvynj5gz.js → index-3e0c4d9d.js} +1 -1
- package/{index-922k2zwq.js → index-40qsd2tg.js} +3 -3
- package/{index-js1gj6f6.js → index-4412550g.js} +8 -8
- package/{index-x5ecanqh.js → index-6c5h9egr.js} +2 -2
- package/{index-tdv66eah.js → index-6h6x9e1n.js} +4 -4
- package/{index-7zeb5r1p.js → index-6yvp6qcb.js} +9 -9
- package/{index-mt0wa941.js → index-88aq81dz.js} +3 -3
- package/index-9bv479q5.js +1 -0
- package/{index-1dhf8ymv.js → index-9h8a7w1c.js} +3 -3
- package/{index-3gccwenr.js → index-9jyxbbnh.js} +1 -1
- package/{index-0ht91675.js → index-9z3xf23k.js} +35 -177
- package/{index-9ndw5d8j.js → index-a675rkqs.js} +7 -7
- package/{index-wfczhj1z.js → index-a9sjjv6x.js} +1 -1
- package/{index-05nxx4m5.js → index-acta9x3j.js} +2 -2
- package/{index-12kzwak1.js → index-b2p3qq5f.js} +2 -2
- package/{index-f5adsa58.js → index-b3br6jhe.js} +4 -4
- package/{index-57q1ayd2.js → index-cb58gjk2.js} +79 -11
- package/{index-0zyatd10.js → index-d1c677h0.js} +2 -2
- package/{index-hm7x0c11.js → index-d2x0mxsa.js} +4 -4
- package/{index-mwj9q2ya.js → index-fjxwyj3f.js} +1 -1
- package/{index-3txrjt6n.js → index-gftc47rk.js} +2 -2
- package/{index-8s8b4eba.js → index-mgdzy0cz.js} +64 -4
- package/{index-0zwznvv1.js → index-nrstta07.js} +1 -1
- package/{index-64g9fsjy.js → index-nt5c22sg.js} +9 -1
- package/{index-5n5hds19.js → index-t8jp2d3r.js} +1016 -658
- package/index-tenw3mah.js +225 -0
- package/{index-6269mf2s.js → index-tnhh146g.js} +8 -8
- package/{index-kjrvwzav.js → index-tpv8j9kq.js} +3 -3
- package/{index-5kh9scvs.js → index-trz8jyh1.js} +3 -73
- package/{index-m6r88hhr.js → index-v8w6kjx4.js} +2 -2
- package/{index-et6ce601.js → index-vp77rhem.js} +1 -1
- package/{index-w134p86k.js → index-zb0807wt.js} +1 -1
- package/{index-hvv5rnaq.js → index-zvhy8nch.js} +2 -2
- package/index.js +23 -23
- package/{library.command-sh70fyvy.js → library.command-stwr5zyk.js} +3 -3
- package/{localRegistry.command-2nbyy84d.js → localRegistry.command-t42y3tn6.js} +15 -14
- package/{module.command-n0bmtzwy.js → module.command-q2tv04e1.js} +5 -5
- package/{package.command-7h9r51bz.js → package.command-zra0r49p.js} +3 -3
- package/package.json +2 -2
- package/{page.command-vjtpfbb1.js → page.command-s7trjw69.js} +3 -3
- package/{pipeline.command-c93se3ar.js → pipeline.command-7p7tagtq.js} +2 -2
- package/{primitive.command-a3075qp2.js → primitive.command-6snsrb00.js} +6 -6
- package/{projectTypecheck-sf9xwaga.js → projectTypecheck-0g5azdzh.js} +1 -1
- package/{quality.command-dw1y9hmy.js → quality.command-n5kk1z6x.js} +3 -3
- package/{repair.command-tg57d8yt.js → repair.command-qngfxjd6.js} +5 -5
- package/{routeSourceValidator-6jd0q6r6.js → routeSourceValidator-4h947v7c.js} +13 -3
- package/{scalar.command-cwzge353.js → scalar.command-s28v00sy.js} +4 -4
- package/skills/akan-debug/SKILL.md +37 -3
- package/{subspace.command-3h03c7kc.js → subspace.command-8atqm584.js} +8 -8
- package/{tunnel.command-czaz6ys4.js → tunnel.command-kvwnw6n8.js} +7 -7
- package/{verify.command-nzwhtz71.js → verify.command-5fpqe0xp.js} +13 -13
- package/{workflow.command-srhky88x.js → workflow.command-0y3gez01.js} +10 -10
- package/{workspace.command-9stchcd2.js → workspace.command-fg6m6bjz.js} +29 -28
- package/CodeAgent-fbcq8vks.js +0 -9
- package/TunnelShare-2p24xxza.js +0 -14
- package/cloud.script-nkmeyhet.js +0 -25
- package/context.runner-w01a32ph.js +0 -26
- package/index-7md2g9vw.js +0 -6
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// pkgs/@akanjs/devkit/preview/PreviewChrome.ts
|
|
3
|
+
import { existsSync } from "fs";
|
|
4
|
+
import { homedir } from "os";
|
|
5
|
+
import path from "path";
|
|
6
|
+
|
|
7
|
+
class PreviewChrome2 {
|
|
8
|
+
static pathEnvKey = "BUN_CHROME_PATH";
|
|
9
|
+
static backendEnvKey = "AKAN_CODE_WEBVIEW_BACKEND";
|
|
10
|
+
static executables = [
|
|
11
|
+
"chromium",
|
|
12
|
+
"chromium-browser",
|
|
13
|
+
"google-chrome-stable",
|
|
14
|
+
"google-chrome",
|
|
15
|
+
"brave-browser",
|
|
16
|
+
"microsoft-edge",
|
|
17
|
+
"chrome"
|
|
18
|
+
];
|
|
19
|
+
static appBundles = [
|
|
20
|
+
"Google Chrome.app/Contents/MacOS/Google Chrome",
|
|
21
|
+
"Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",
|
|
22
|
+
"Chromium.app/Contents/MacOS/Chromium",
|
|
23
|
+
"Brave Browser.app/Contents/MacOS/Brave Browser",
|
|
24
|
+
"Microsoft Edge.app/Contents/MacOS/Microsoft Edge"
|
|
25
|
+
];
|
|
26
|
+
static get backend() {
|
|
27
|
+
const declared = process.env[PreviewChrome2.backendEnvKey];
|
|
28
|
+
if (declared === "webkit" || declared === "chrome")
|
|
29
|
+
return declared;
|
|
30
|
+
return process.platform === "darwin" ? "webkit" : "chrome";
|
|
31
|
+
}
|
|
32
|
+
static executable() {
|
|
33
|
+
const declared = process.env[PreviewChrome2.pathEnvKey];
|
|
34
|
+
if (declared)
|
|
35
|
+
return declared;
|
|
36
|
+
for (const name of PreviewChrome2.executables) {
|
|
37
|
+
const found = Bun.which(name);
|
|
38
|
+
if (found)
|
|
39
|
+
return found;
|
|
40
|
+
}
|
|
41
|
+
if (process.platform !== "darwin")
|
|
42
|
+
return;
|
|
43
|
+
for (const root of ["/Applications", path.join(homedir(), "Applications")])
|
|
44
|
+
for (const bundle of PreviewChrome2.appBundles) {
|
|
45
|
+
const candidate = path.join(root, bundle);
|
|
46
|
+
if (existsSync(candidate))
|
|
47
|
+
return candidate;
|
|
48
|
+
}
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
static get available() {
|
|
52
|
+
return PreviewChrome2.isAvailable();
|
|
53
|
+
}
|
|
54
|
+
static isAvailable(engine = PreviewChrome2.backend) {
|
|
55
|
+
return engine === "webkit" ? process.platform === "darwin" : !!PreviewChrome2.executable();
|
|
56
|
+
}
|
|
57
|
+
static backendOption(engine = PreviewChrome2.backend) {
|
|
58
|
+
if (engine === "webkit")
|
|
59
|
+
return "webkit";
|
|
60
|
+
const argv = ["--disable-dev-shm-usage"];
|
|
61
|
+
if (process.getuid?.() === 0)
|
|
62
|
+
argv.push("--no-sandbox");
|
|
63
|
+
return { type: "chrome", argv };
|
|
64
|
+
}
|
|
65
|
+
static dockerRuns = [
|
|
66
|
+
"apt-get update && apt-get install -y --no-install-recommends chromium fonts-liberation fonts-noto-color-emoji fonts-noto-cjk && rm -rf /var/lib/apt/lists/*"
|
|
67
|
+
];
|
|
68
|
+
static unavailableReason(engine = PreviewChrome2.backend) {
|
|
69
|
+
if (PreviewChrome2.isAvailable(engine))
|
|
70
|
+
return;
|
|
71
|
+
if (engine === "webkit")
|
|
72
|
+
return `The webkit WebView backend exists only on macOS. Set ${PreviewChrome2.backendEnvKey}=chrome and install a browser.`;
|
|
73
|
+
return [
|
|
74
|
+
"The page preview needs a browser and this machine has none on PATH.",
|
|
75
|
+
`Install one (${PreviewChrome2.dockerRuns[0]}) or point ${PreviewChrome2.pathEnvKey} at an existing Chrome.`
|
|
76
|
+
].join(" ");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// pkgs/@akanjs/devkit/preview/PreviewView.ts
|
|
81
|
+
class PreviewView2 {
|
|
82
|
+
static get available() {
|
|
83
|
+
return PreviewView2.isAvailable();
|
|
84
|
+
}
|
|
85
|
+
static isAvailable(engine = PreviewChrome2.backend) {
|
|
86
|
+
return typeof Bun.WebView === "function" && PreviewChrome2.isAvailable(engine);
|
|
87
|
+
}
|
|
88
|
+
static unavailableReason(engine = PreviewChrome2.backend) {
|
|
89
|
+
if (typeof Bun.WebView !== "function")
|
|
90
|
+
return "This Bun build has no WebView, so the page preview is off.";
|
|
91
|
+
return PreviewChrome2.unavailableReason(engine);
|
|
92
|
+
}
|
|
93
|
+
static async probe(url, {
|
|
94
|
+
screenshot = false,
|
|
95
|
+
width = 1280,
|
|
96
|
+
height = 800,
|
|
97
|
+
engine = PreviewChrome2.backend,
|
|
98
|
+
timeoutMs = 30000,
|
|
99
|
+
settleMs = 0
|
|
100
|
+
} = {}) {
|
|
101
|
+
const logs = [];
|
|
102
|
+
const deadline = Date.now() + timeoutMs;
|
|
103
|
+
const within = (work, what) => PreviewView2.#within(work, deadline, `${what} ${url}`);
|
|
104
|
+
const view = PreviewView2.#open({ width, height, engine, onConsole: (line) => logs.push(line) });
|
|
105
|
+
try {
|
|
106
|
+
let page = await PreviewView2.#load(view, url, settleMs, within);
|
|
107
|
+
if (page.empty) {
|
|
108
|
+
logs.length = 0;
|
|
109
|
+
page = await PreviewView2.#load(view, url, settleMs, within);
|
|
110
|
+
}
|
|
111
|
+
const result = {
|
|
112
|
+
url,
|
|
113
|
+
finalUrl: page.href,
|
|
114
|
+
status: page.status ?? await PreviewView2.#statusOf(page.href, deadline),
|
|
115
|
+
title: page.title,
|
|
116
|
+
text: page.text,
|
|
117
|
+
consoleErrors: logs.filter((line) => line.startsWith("error")),
|
|
118
|
+
consoleWarnings: logs.filter((line) => line.startsWith("warn")),
|
|
119
|
+
pageErrors: page.pageErrors,
|
|
120
|
+
domFindings: page.domFindings
|
|
121
|
+
};
|
|
122
|
+
if (screenshot)
|
|
123
|
+
result.screenshot = await within(view.screenshot({ encoding: "base64" }), "screenshotting");
|
|
124
|
+
return result;
|
|
125
|
+
} finally {
|
|
126
|
+
await view.close();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
static async#load(view, url, settleMs, within) {
|
|
130
|
+
await within(view.navigate(url), "loading");
|
|
131
|
+
if (settleMs > 0)
|
|
132
|
+
await Bun.sleep(settleMs);
|
|
133
|
+
const read = await within(view.evaluate(readPageExpression), "reading");
|
|
134
|
+
return {
|
|
135
|
+
href: typeof read?.href === "string" ? read.href : url,
|
|
136
|
+
title: typeof read?.title === "string" ? read.title : "",
|
|
137
|
+
text: typeof read?.text === "string" ? read.text : "",
|
|
138
|
+
status: typeof read?.status === "number" && read.status > 0 ? read.status : null,
|
|
139
|
+
empty: read?.empty === true,
|
|
140
|
+
pageErrors: PreviewView2.#strings(read?.pageErrors),
|
|
141
|
+
domFindings: PreviewView2.#strings(read?.domFindings)
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static async#statusOf(href, deadline) {
|
|
145
|
+
const left = Math.max(1, deadline - Date.now());
|
|
146
|
+
const response = await fetch(href, { redirect: "manual", signal: AbortSignal.timeout(left) }).catch(() => null);
|
|
147
|
+
return response?.status ?? null;
|
|
148
|
+
}
|
|
149
|
+
static async#within(work, deadline, what) {
|
|
150
|
+
let timer;
|
|
151
|
+
const expired = new Promise((_, reject) => {
|
|
152
|
+
timer = setTimeout(() => reject(new Error(`Timed out ${what}; the dev server may be rebuilding or stuck.`)), Math.max(0, deadline - Date.now()));
|
|
153
|
+
});
|
|
154
|
+
try {
|
|
155
|
+
return await Promise.race([work, expired]);
|
|
156
|
+
} finally {
|
|
157
|
+
clearTimeout(timer);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
static #open({
|
|
161
|
+
width,
|
|
162
|
+
height,
|
|
163
|
+
engine,
|
|
164
|
+
onConsole
|
|
165
|
+
}) {
|
|
166
|
+
const Ctor = Bun.WebView;
|
|
167
|
+
return new Ctor({
|
|
168
|
+
width,
|
|
169
|
+
height,
|
|
170
|
+
dataStore: "ephemeral",
|
|
171
|
+
backend: PreviewChrome2.backendOption(engine),
|
|
172
|
+
console: (type, ...args) => onConsole(`${type} ${PreviewView2.formatConsole(args)}`)
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
static formatConsole(args) {
|
|
176
|
+
const [first, ...rest] = args;
|
|
177
|
+
const head = typeof first === "string" ? first.replace(/%[sdifoOc]/g, (token) => {
|
|
178
|
+
if (!rest.length)
|
|
179
|
+
return token;
|
|
180
|
+
const value = rest.shift();
|
|
181
|
+
return token === "%c" ? "" : String(value);
|
|
182
|
+
}) : String(first);
|
|
183
|
+
return [head, ...rest.map(String)].join(" ").replace(/\n(\s*\n)+/g, `
|
|
184
|
+
`).slice(0, 1500);
|
|
185
|
+
}
|
|
186
|
+
static #strings(value) {
|
|
187
|
+
return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
var readPageExpression = `(() => {
|
|
191
|
+
const pageErrors = [];
|
|
192
|
+
const domFindings = [];
|
|
193
|
+
const body = document.body;
|
|
194
|
+
const rendered = body ? Array.from(body.children).filter((el) => !["SCRIPT", "STYLE", "TEMPLATE", "LINK", "NOSCRIPT"].includes(el.tagName) && !el.classList.contains("__akan_hmr_overlay")) : [];
|
|
195
|
+
const empty = !rendered.length && !(body && body.innerText && body.innerText.trim());
|
|
196
|
+
if (empty) pageErrors.push("The page body rendered empty.");
|
|
197
|
+
if (self.__AKAN_HMR_SYSTEM_PAGE__) pageErrors.push("The server could not render this page and answered with its error page: " + (body ? body.innerText.trim().replace(/\\s+/g, " ").slice(0, 400) : ""));
|
|
198
|
+
const overlay = document.querySelector('.__akan_hmr_overlay[data-status="error"]');
|
|
199
|
+
if (overlay) pageErrors.push("The dev build failed: " + overlay.textContent.trim().slice(0, 400));
|
|
200
|
+
const all = Array.from(document.querySelectorAll("body *"));
|
|
201
|
+
const viewportWidth = document.documentElement.clientWidth;
|
|
202
|
+
const pageWidth = document.documentElement.scrollWidth;
|
|
203
|
+
if (pageWidth > viewportWidth + 8) {
|
|
204
|
+
const wide = all.find((el) => el.getBoundingClientRect().right > viewportWidth + 8);
|
|
205
|
+
domFindings.push("The page is " + pageWidth + "px wide in a " + viewportWidth + "px viewport" + (wide ? ", first wider element: " + (wide.tagName.toLowerCase() + "." + (typeof wide.className === "string" ? wide.className : "")).slice(0, 120) : "") + ".");
|
|
206
|
+
}
|
|
207
|
+
const invisibleText = all.filter((el) => {
|
|
208
|
+
if (!el.textContent || !el.textContent.trim()) return false;
|
|
209
|
+
const style = getComputedStyle(el);
|
|
210
|
+
return style.color === style.backgroundColor && style.backgroundColor !== "rgba(0, 0, 0, 0)";
|
|
211
|
+
});
|
|
212
|
+
if (invisibleText.length) domFindings.push(invisibleText.length + " element(s) render text in the same colour as their background.");
|
|
213
|
+
const unresolved = all.filter((el) => /(^|\\s)(bg|text|border)-(base-100|base-content|primary-content|error)(\\s|$)/.test(typeof el.className === "string" ? el.className : ""));
|
|
214
|
+
if (unresolved.length) domFindings.push(unresolved.length + " element(s) use a dropped daisyUI colour slot that renders no CSS.");
|
|
215
|
+
const navigation = performance.getEntriesByType("navigation")[0];
|
|
216
|
+
const status = navigation && typeof navigation.responseStatus === "number" ? navigation.responseStatus : null;
|
|
217
|
+
const text = body ? body.innerText.trim().replace(/\\s+/g, " ").slice(0, 600) : "";
|
|
218
|
+
return { href: location.href, title: document.title, text, status, empty, pageErrors, domFindings };
|
|
219
|
+
})()`;
|
|
220
|
+
|
|
221
|
+
// pkgs/@akanjs/devkit/stripAnsi.ts
|
|
222
|
+
var ansi = new RegExp(`${String.fromCharCode(27)}(?:[@-Z\\\\-_]|\\[[\\s\\S]*?[@-~])`, "g");
|
|
223
|
+
var stripAnsi = (text) => text.replace(ansi, "");
|
|
224
|
+
|
|
225
|
+
export { PreviewChrome2, PreviewView2, stripAnsi };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AppExecutor
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-nt5c22sg.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText,
|
|
7
7
|
createWorkflowBaselineSummary,
|
|
8
8
|
buildAkanModuleContextIndex,
|
|
9
9
|
toolingRolloutGate
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-acta9x3j.js";
|
|
11
11
|
import {
|
|
12
12
|
buildResourceList,
|
|
13
13
|
codexMcpConfigPath,
|
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
upsertCodexMcpServerBlock,
|
|
18
18
|
renderDoctorText,
|
|
19
19
|
AkanContextAnalyzer
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-mgdzy0cz.js";
|
|
21
21
|
import {
|
|
22
22
|
runner
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-9jyxbbnh.js";
|
|
24
24
|
import {
|
|
25
25
|
NativeApp
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-tpv8j9kq.js";
|
|
27
27
|
import {
|
|
28
28
|
isPlaceholderAppId
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-zb0807wt.js";
|
|
30
30
|
import {
|
|
31
31
|
getMobileTargets,
|
|
32
32
|
appIdsOf
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
} from "./index-r2wedvqn.js";
|
|
37
37
|
import {
|
|
38
38
|
RepairRunner
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-40qsd2tg.js";
|
|
40
40
|
import {
|
|
41
41
|
WorkflowRunner
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-4412550g.js";
|
|
43
43
|
|
|
44
44
|
// pkgs/@akanjs/devkit/akanMcpContract.ts
|
|
45
45
|
import path from "path";
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
AkanAppConfig,
|
|
6
6
|
Executor,
|
|
7
7
|
WorkspaceExecutor
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-nt5c22sg.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveAppId,
|
|
11
11
|
targetHtmlFilename
|
|
12
12
|
} from "./index-m9jj544v.js";
|
|
13
13
|
import {
|
|
14
14
|
CsrArtifactBuilder
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-9h8a7w1c.js";
|
|
16
16
|
import {
|
|
17
17
|
ExitCodeError
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-9jyxbbnh.js";
|
|
19
19
|
|
|
20
20
|
// pkgs/@akanjs/devkit/mobile/desktopBin.ts
|
|
21
21
|
import { chmod, mkdir, rename, rm, writeFile } from "fs/promises";
|
|
@@ -10,14 +10,11 @@ import {
|
|
|
10
10
|
AppExecutor,
|
|
11
11
|
LibExecutor,
|
|
12
12
|
PkgExecutor
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-nt5c22sg.js";
|
|
14
14
|
import {
|
|
15
15
|
WorkspaceRunner,
|
|
16
16
|
AkanQualityScanner
|
|
17
|
-
} from "./index-
|
|
18
|
-
import {
|
|
19
|
-
ExitCodeError
|
|
20
|
-
} from "./index-3gccwenr.js";
|
|
17
|
+
} from "./index-v8w6kjx4.js";
|
|
21
18
|
|
|
22
19
|
// pkgs/@akanjs/cli/verify/verifyComments.ts
|
|
23
20
|
import { existsSync } from "fs";
|
|
@@ -444,71 +441,4 @@ class VerifyReport {
|
|
|
444
441
|
}
|
|
445
442
|
}
|
|
446
443
|
|
|
447
|
-
|
|
448
|
-
class VerifyScope {
|
|
449
|
-
targets;
|
|
450
|
-
constructor(targets) {
|
|
451
|
-
this.targets = targets;
|
|
452
|
-
}
|
|
453
|
-
get touchesTsx() {
|
|
454
|
-
return this.targets.some((target) => target.files.some((file) => file.endsWith(".tsx")));
|
|
455
|
-
}
|
|
456
|
-
get changedFiles() {
|
|
457
|
-
return new Set(this.targets.flatMap((target) => target.files));
|
|
458
|
-
}
|
|
459
|
-
static async changesIn(workspaceRoot) {
|
|
460
|
-
const prefix = await VerifyScope.#git(workspaceRoot, ["rev-parse", "--show-prefix"]);
|
|
461
|
-
if (prefix === null)
|
|
462
|
-
return null;
|
|
463
|
-
const status = await VerifyScope.#git(workspaceRoot, ["status", "--porcelain=v1", "-z", "--untracked-files=all"]);
|
|
464
|
-
if (status === null)
|
|
465
|
-
return null;
|
|
466
|
-
return VerifyScope.parseStatus(status, prefix.trim());
|
|
467
|
-
}
|
|
468
|
-
static parseStatus(status, prefix = "") {
|
|
469
|
-
const tokens = status.split("\x00");
|
|
470
|
-
const changes = [];
|
|
471
|
-
for (let idx = 0;idx < tokens.length; idx++) {
|
|
472
|
-
const token = tokens[idx] ?? "";
|
|
473
|
-
if (token.length < 4)
|
|
474
|
-
continue;
|
|
475
|
-
const code = token.slice(0, 2);
|
|
476
|
-
const file = token.slice(3);
|
|
477
|
-
if (code.includes("R") || code.includes("C"))
|
|
478
|
-
idx++;
|
|
479
|
-
if (!file.startsWith(prefix))
|
|
480
|
-
continue;
|
|
481
|
-
changes.push({ code, file: file.slice(prefix.length) });
|
|
482
|
-
}
|
|
483
|
-
return changes;
|
|
484
|
-
}
|
|
485
|
-
static resolve(changes, names, requested = []) {
|
|
486
|
-
const known = VerifyScope.#knownTargets(names);
|
|
487
|
-
const changedFilesOf = (dir) => changes.filter((change) => change.file.startsWith(`${dir}/`)).map((change) => change.file);
|
|
488
|
-
if (requested.length) {
|
|
489
|
-
const targets = requested.map((name) => {
|
|
490
|
-
const target = known.find((candidate) => candidate.name === name);
|
|
491
|
-
if (!target)
|
|
492
|
-
throw new ExitCodeError(`${name} is not an app, library or package of this workspace`, 2);
|
|
493
|
-
return { ...target, files: changedFilesOf(target.dir) };
|
|
494
|
-
});
|
|
495
|
-
return new VerifyScope(targets);
|
|
496
|
-
}
|
|
497
|
-
const targets = known.map((target) => ({ ...target, files: changedFilesOf(target.dir) })).filter((target) => target.files.length > 0);
|
|
498
|
-
return new VerifyScope(targets);
|
|
499
|
-
}
|
|
500
|
-
static #knownTargets({ apps, libs, pkgs }) {
|
|
501
|
-
return [
|
|
502
|
-
...apps.map((name) => ({ type: "app", name, dir: `apps/${name}`, files: [] })),
|
|
503
|
-
...libs.map((name) => ({ type: "lib", name, dir: `libs/${name}`, files: [] })),
|
|
504
|
-
...pkgs.map((name) => ({ type: "pkg", name, dir: `pkgs/${name}`, files: [] }))
|
|
505
|
-
];
|
|
506
|
-
}
|
|
507
|
-
static async#git(cwd, args) {
|
|
508
|
-
const proc = Bun.spawn(["git", ...args], { cwd, stdout: "pipe", stderr: "ignore" });
|
|
509
|
-
const [text, exitCode] = await Promise.all([new Response(proc.stdout).text(), proc.exited]);
|
|
510
|
-
return exitCode === 0 ? text : null;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
export { VerifyComments, VerifyPipeline, VerifyReport, VerifyScope };
|
|
444
|
+
export { VerifyComments, VerifyPipeline, VerifyReport };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
camelToKebabCase,
|
|
4
4
|
runner
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-9jyxbbnh.js";
|
|
6
6
|
import {
|
|
7
7
|
FileSys2
|
|
8
8
|
} from "./index-52w0fvh8.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
WorkspaceExecutor,
|
|
22
22
|
SysExecutor,
|
|
23
23
|
LibExecutor
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-nt5c22sg.js";
|
|
25
25
|
import {
|
|
26
26
|
countBlocking,
|
|
27
27
|
formatStyleContract,
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-9jyxbbnh.js";
|
|
6
6
|
import {
|
|
7
7
|
LibSource,
|
|
8
8
|
formatLibStatuses,
|
|
9
9
|
CommandExecutionError,
|
|
10
10
|
LibExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-nt5c22sg.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/library/library.script.ts
|
|
14
14
|
import { Logger } from "akanjs/common";
|
package/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
getTargetMetas,
|
|
5
5
|
getTargetCommandNames,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9jyxbbnh.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-nt5c22sg.js";
|
|
10
10
|
|
|
11
11
|
// pkgs/@akanjs/cli/bunVersionGuard.ts
|
|
12
12
|
class BunVersionGuard {
|
|
@@ -22,27 +22,27 @@ import path from "path";
|
|
|
22
22
|
|
|
23
23
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
24
24
|
var commandModules = {
|
|
25
|
-
workspace: async () => (await import("./workspace.command-
|
|
26
|
-
agent: async () => (await import("./agent.command-
|
|
27
|
-
code: async () => (await import("./code.command-
|
|
28
|
-
application: async () => (await import("./application.command-
|
|
29
|
-
library: async () => (await import("./library.command-
|
|
30
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
31
|
-
package: async () => (await import("./package.command-
|
|
32
|
-
module: async () => (await import("./module.command-
|
|
33
|
-
page: async () => (await import("./page.command-
|
|
34
|
-
context: async () => (await import("./context.command-
|
|
35
|
-
cloud: async () => (await import("./cloud.command-
|
|
36
|
-
subspace: async () => (await import("./subspace.command-
|
|
37
|
-
guideline: async () => (await import("./guideline.command-
|
|
38
|
-
scalar: async () => (await import("./scalar.command-
|
|
39
|
-
primitive: async () => (await import("./primitive.command-
|
|
40
|
-
quality: async () => (await import("./quality.command-
|
|
41
|
-
verify: async () => (await import("./verify.command-
|
|
42
|
-
repair: async () => (await import("./repair.command-
|
|
43
|
-
workflow: async () => (await import("./workflow.command-
|
|
44
|
-
pipeline: async () => (await import("./pipeline.command-
|
|
45
|
-
tunnel: async () => (await import("./tunnel.command-
|
|
25
|
+
workspace: async () => (await import("./workspace.command-fg6m6bjz.js")).WorkspaceCommand,
|
|
26
|
+
agent: async () => (await import("./agent.command-xc1mf4yz.js")).AgentCommand,
|
|
27
|
+
code: async () => (await import("./code.command-pvfczhpy.js")).CodeCommand,
|
|
28
|
+
application: async () => (await import("./application.command-frkm7n6t.js")).ApplicationCommand,
|
|
29
|
+
library: async () => (await import("./library.command-stwr5zyk.js")).LibraryCommand,
|
|
30
|
+
localRegistry: async () => (await import("./localRegistry.command-t42y3tn6.js")).LocalRegistryCommand,
|
|
31
|
+
package: async () => (await import("./package.command-zra0r49p.js")).PackageCommand,
|
|
32
|
+
module: async () => (await import("./module.command-q2tv04e1.js")).ModuleCommand,
|
|
33
|
+
page: async () => (await import("./page.command-s7trjw69.js")).PageCommand,
|
|
34
|
+
context: async () => (await import("./context.command-cp6fstk3.js")).ContextCommand,
|
|
35
|
+
cloud: async () => (await import("./cloud.command-gakbzmdj.js")).CloudCommand,
|
|
36
|
+
subspace: async () => (await import("./subspace.command-8atqm584.js")).SubspaceCommand,
|
|
37
|
+
guideline: async () => (await import("./guideline.command-761yyxqb.js")).GuidelineCommand,
|
|
38
|
+
scalar: async () => (await import("./scalar.command-s28v00sy.js")).ScalarCommand,
|
|
39
|
+
primitive: async () => (await import("./primitive.command-6snsrb00.js")).PrimitiveCommand,
|
|
40
|
+
quality: async () => (await import("./quality.command-n5kk1z6x.js")).QualityCommand,
|
|
41
|
+
verify: async () => (await import("./verify.command-5fpqe0xp.js")).VerifyCommand,
|
|
42
|
+
repair: async () => (await import("./repair.command-qngfxjd6.js")).RepairCommand,
|
|
43
|
+
workflow: async () => (await import("./workflow.command-0y3gez01.js")).WorkflowCommand,
|
|
44
|
+
pipeline: async () => (await import("./pipeline.command-7p7tagtq.js")).PipelineCommand,
|
|
45
|
+
tunnel: async () => (await import("./tunnel.command-kvwnw6n8.js")).TunnelCommand
|
|
46
46
|
};
|
|
47
47
|
var commandModuleIds = Object.keys(commandModules);
|
|
48
48
|
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
Lib,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-9jyxbbnh.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-nt5c22sg.js";
|
|
9
9
|
import {
|
|
10
10
|
LibraryScript
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-zvhy8nch.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/library/library.command.ts
|
|
14
14
|
class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
|
|
@@ -4,35 +4,36 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9jyxbbnh.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-nt5c22sg.js";
|
|
12
12
|
import"./index-p6x5b7hr.js";
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
13
|
+
import"./index-tpv8j9kq.js";
|
|
14
|
+
import"./index-zb0807wt.js";
|
|
15
15
|
import"./index-m9jj544v.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
16
|
+
import"./index-9h8a7w1c.js";
|
|
17
|
+
import"./index-nrstta07.js";
|
|
18
|
+
import"./index-zvhy8nch.js";
|
|
19
|
+
import"./index-cb58gjk2.js";
|
|
20
20
|
import {
|
|
21
21
|
ApplicationScript
|
|
22
|
-
} from "./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
22
|
+
} from "./index-t8jp2d3r.js";
|
|
23
|
+
import"./index-tenw3mah.js";
|
|
24
|
+
import"./index-d1c677h0.js";
|
|
25
25
|
import {
|
|
26
26
|
CloudRunner
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-1qmfdbjf.js";
|
|
28
28
|
import"./index-tvehn2sp.js";
|
|
29
29
|
import {
|
|
30
30
|
PackageScript
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-gftc47rk.js";
|
|
32
32
|
import {
|
|
33
33
|
getNpmRegistryUrl
|
|
34
34
|
} from "./index-m5n3ka0p.js";
|
|
35
|
-
import"./index-
|
|
35
|
+
import"./index-fjxwyj3f.js";
|
|
36
|
+
import"./index-9bv479q5.js";
|
|
36
37
|
|
|
37
38
|
// pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
|
|
38
39
|
import { mkdir, rm } from "fs/promises";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
Sys,
|
|
4
4
|
Module,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-9jyxbbnh.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-nt5c22sg.js";
|
|
9
9
|
import {
|
|
10
10
|
renderPrimitiveReport
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
} from "./index-acta9x3j.js";
|
|
12
|
+
import"./index-3e0c4d9d.js";
|
|
13
13
|
import {
|
|
14
14
|
ModuleScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-6h6x9e1n.js";
|
|
16
16
|
|
|
17
17
|
// pkgs/@akanjs/cli/module/module.command.ts
|
|
18
18
|
import { Logger, lowerlize } from "akanjs/common";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
Pkg,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-9jyxbbnh.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-nt5c22sg.js";
|
|
9
9
|
import"./index-tvehn2sp.js";
|
|
10
10
|
import {
|
|
11
11
|
PackageScript
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-gftc47rk.js";
|
|
13
13
|
|
|
14
14
|
// pkgs/@akanjs/cli/package/package.command.ts
|
|
15
15
|
class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "3.1.1-rc.
|
|
3
|
+
"version": "3.1.1-rc.19",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@earendil-works/pi-tui": "1.3.0",
|
|
40
40
|
"@inquirer/prompts": "^8.7.3",
|
|
41
41
|
"@tailwindcss/node": "^4.3.3",
|
|
42
|
-
"akanjs": "3.1.1-rc.
|
|
42
|
+
"akanjs": "3.1.1-rc.19",
|
|
43
43
|
"chalk": "^6.0.1",
|
|
44
44
|
"commander": "^15.0.0",
|
|
45
45
|
"dayjs": "^1.11.23",
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Module,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-9jyxbbnh.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-nt5c22sg.js";
|
|
9
9
|
import {
|
|
10
10
|
PageScript
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-3e0c4d9d.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/page/page.command.ts
|
|
14
14
|
class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9jyxbbnh.js";
|
|
8
8
|
import {
|
|
9
9
|
FileSys2
|
|
10
10
|
} from "./index-52w0fvh8.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
AkanAppConfig,
|
|
13
13
|
AkanWorkspaceConfig,
|
|
14
14
|
AppExecutor
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-nt5c22sg.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveMobileTargets
|
|
18
18
|
} from "./index-m9jj544v.js";
|