@akanjs/cli 3.0.0-alpha.79 → 3.0.0-alpha.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build-stamp +1 -1
- package/{abstractCompactor-8yjc9sj4.js → abstractCompactor-pwc6d6yk.js} +3 -5
- package/{agent.command-q2rgd8jz.js → agent.command-180hh0ye.js} +11 -14
- package/{application.command-kd5zj0k9.js → application.command-gmcgen9y.js} +29 -34
- package/{applicationBuildRunner-8tqhxjd0.js → applicationBuildRunner-tavpx3fv.js} +9 -12
- package/{applicationReleasePackager-0jf6ejr4.js → applicationReleasePackager-ktjt0erc.js} +6 -7
- package/buildBatch.proc.js +12 -15
- package/capacitorApp-kwa67kzs.js +12 -0
- package/{cloud.command-v60xnfdx.js → cloud.command-gpq7qxrc.js} +15 -21
- package/{context.command-hac3x83c.js → context.command-dk2m2sjx.js} +19 -24
- package/dependencyScanner-c64m6fxp.js +8 -0
- package/{fleet.command-jv24wcae.js → fleet.command-3bkyyd3a.js} +67 -24
- package/getDirname-dr3jz1xg.js +7 -0
- package/{guideline.command-85x1tvjb.js → guideline.command-w6ddv13r.js} +16 -19
- package/incrementalBuilder.proc.js +17 -20
- package/{index-yz8988we.js → index-1kzsn94d.js} +1 -1
- package/{index-dz1q44m8.js → index-3c9n3nt8.js} +21 -21
- package/{index-76rn3g2c.js → index-47pj3aee.js} +4 -4
- package/{index-dfn0kqj7.js → index-5n0hf8r9.js} +19 -19
- package/{index-w0g7hcr7.js → index-5y7qba1c.js} +19 -19
- package/{index-1577bej2.js → index-6wwzs1bc.js} +2 -2
- package/{index-94hdqqka.js → index-92zztqy1.js} +6 -6
- package/{index-ffrhjdwd.js → index-a8h184wr.js} +7 -7
- package/{index-67546d0j.js → index-ayy5ecax.js} +1 -1
- package/{index-zec5gcx0.js → index-b2nt0w0k.js} +7 -7
- package/{index-xys926f2.js → index-by5gpp8x.js} +4 -4
- package/{index-47zynjx7.js → index-cd5x18qh.js} +32 -32
- package/{index-pzsryyjv.js → index-dq6wq1tv.js} +39 -39
- package/{index-psx0z6hb.js → index-ee8z8adx.js} +13 -13
- package/{index-zp0cmfgd.js → index-f7wewj2v.js} +22 -25
- package/{index-1szrbtj9.js → index-ft1sfjz0.js} +20 -23
- package/{index-k7731a4v.js → index-h7yw2z9n.js} +3 -3
- package/{index-egng0kc4.js → index-j9vnq8tr.js} +18 -18
- package/{index-zkrzv21w.js → index-k1n0h7dk.js} +519 -123
- package/{index-pj3hk9kt.js → index-k86zc21w.js} +57 -57
- package/{index-h5sr2nnj.js → index-mfm35dhh.js} +5 -5
- package/{index-qwfwk8be.js → index-qcracvc9.js} +8 -8
- package/{index-6w77v5df.js → index-saheq2bs.js} +4 -4
- package/{index-ta1mk0xh.js → index-v0s24t8j.js} +15 -15
- package/{index-safgeq9a.js → index-wet2ytnr.js} +8 -8
- package/{index-jn9b717k.js → index-xnhf8tr9.js} +1 -1
- package/{index-7605ykh6.js → index-xxe90kqy.js} +6 -6
- package/{index-25qfm3at.js → index-z3c9mmw4.js} +14 -16
- package/index.js +22 -27
- package/{library.command-nvp0wetm.js → library.command-wpedct6c.js} +7 -11
- package/{localRegistry.command-dnefn893.js → localRegistry.command-pjdxa01g.js} +20 -26
- package/{module.command-xs6ded4j.js → module.command-8n4kct3e.js} +13 -17
- package/{package.command-af8sxhff.js → package.command-fcbd0b1d.js} +8 -11
- package/package.json +2 -2
- package/{page.command-gr6rbz17.js → page.command-x4379grq.js} +7 -10
- package/{primitive.command-qjf4mbth.js → primitive.command-8etmnqhq.js} +13 -17
- package/{quality.command-9xhaxzm1.js → quality.command-hfx7z8yr.js} +11 -14
- package/recipeScanner-fpagtgc1.js +11 -0
- package/{repair.command-a2z4d5a0.js → repair.command-j0fs5qkz.js} +12 -15
- package/{routeSourceValidator-7fycdqyv.js → routeSourceValidator-ze6x894c.js} +0 -2
- package/{scalar.command-ax8taqh1.js → scalar.command-2emk89eh.js} +11 -15
- package/templates/workspaceRoot/package.json.template +1 -3
- package/typeChecker-3xgrzc2v.js +7 -0
- package/typecheck.proc.js +4 -5
- package/{workflow.command-gwkw0jae.js → workflow.command-cvpmzwjg.js} +22 -26
- package/{workspace.command-53qpkgzp.js → workspace.command-mbb5s3wx.js} +57 -64
- package/capacitorApp-szqr3cxr.js +0 -62
- package/dependencyScanner-aqg3dkks.js +0 -9
- package/getDirname-ka11hm7e.js +0 -8
- package/index-dp66vwr6.js +0 -348
- package/index-mxvakhsm.js +0 -66
- package/index-yb2wsc7f.js +0 -4
- package/recipeScanner-zrzev25x.js +0 -12
- package/typeChecker-yhs4eht8.js +0 -8
- /package/{index-19nz5chq.js → index-3d9y066c.js} +0 -0
- /package/{index-ynf37b66.js → index-a5vmm6x4.js} +0 -0
- /package/{index-5vy2jzar.js → index-ctphds8v.js} +0 -0
- /package/{index-0wae5ebk.js → index-meh558jy.js} +0 -0
- /package/{index-scemmfpj.js → index-n68jx79w.js} +0 -0
- /package/{index-ss469dec.js → index-nz8prx9g.js} +0 -0
- /package/{index-jcm6zr20.js → index-x23688ar.js} +0 -0
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
WorkspaceExecutor,
|
|
4
|
+
AppExecutor
|
|
5
|
+
} from "./index-k1n0h7dk.js";
|
|
6
|
+
import"./index-ayy5ecax.js";
|
|
7
|
+
import"./index-6wwzs1bc.js";
|
|
5
8
|
import {
|
|
9
|
+
GraphClientEntryDiscovery,
|
|
10
|
+
RouteClientBuilder,
|
|
6
11
|
AutoImportSync,
|
|
7
12
|
DevChangePlanner,
|
|
8
|
-
DevGeneratedIndexSync
|
|
9
|
-
|
|
10
|
-
RouteClientBuilder
|
|
11
|
-
} from "./index-jcm6zr20.js";
|
|
13
|
+
DevGeneratedIndexSync
|
|
14
|
+
} from "./index-x23688ar.js";
|
|
12
15
|
import {
|
|
13
16
|
HmrWatcher,
|
|
14
17
|
WatchRootResolver
|
|
15
|
-
} from "./index-
|
|
18
|
+
} from "./index-ctphds8v.js";
|
|
16
19
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from "./index-zkrzv21w.js";
|
|
20
|
-
import"./index-dp66vwr6.js";
|
|
21
|
-
import"./index-mxvakhsm.js";
|
|
22
|
-
import"./index-1577bej2.js";
|
|
23
|
-
import"./index-67546d0j.js";
|
|
24
|
-
import"./index-yb2wsc7f.js";
|
|
20
|
+
prepareDevWatchBatch
|
|
21
|
+
} from "./index-a5vmm6x4.js";
|
|
25
22
|
|
|
26
23
|
// pkgs/@akanjs/devkit/incrementalBuilder/incrementalBuilder.proc.ts
|
|
27
24
|
import path2 from "path";
|
|
@@ -69,13 +66,13 @@ class BuildBatchRunner {
|
|
|
69
66
|
env: process.env,
|
|
70
67
|
stdio: ["ignore", "inherit", "inherit"],
|
|
71
68
|
serialization: "advanced",
|
|
72
|
-
ipc: (
|
|
73
|
-
if (!
|
|
69
|
+
ipc: (message) => {
|
|
70
|
+
if (!message || typeof message !== "object")
|
|
74
71
|
return;
|
|
75
|
-
if (
|
|
76
|
-
result =
|
|
72
|
+
if (message.type === "build-batch-result")
|
|
73
|
+
result = message.data;
|
|
77
74
|
else
|
|
78
|
-
onMessage(
|
|
75
|
+
onMessage(message);
|
|
79
76
|
}
|
|
80
77
|
});
|
|
81
78
|
const exitCode = await proc.exited;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
CloudApi,
|
|
3
|
+
getDefaultHostConfig,
|
|
5
4
|
GlobalConfig,
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
CloudApi,
|
|
6
|
+
AiSession
|
|
7
|
+
} from "./index-wet2ytnr.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
WorkspaceExecutor,
|
|
10
|
+
AppExecutor
|
|
11
|
+
} from "./index-k1n0h7dk.js";
|
|
11
12
|
import {
|
|
12
13
|
runner
|
|
13
|
-
} from "./index-
|
|
14
|
+
} from "./index-ft1sfjz0.js";
|
|
14
15
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from "./index-zkrzv21w.js";
|
|
16
|
+
openBrowser
|
|
17
|
+
} from "./index-f7wewj2v.js";
|
|
18
18
|
|
|
19
19
|
// pkgs/@akanjs/cli/npmRegistry.ts
|
|
20
20
|
var defaultNpmRegistry = "https://registry.npmjs.org";
|
|
@@ -98,8 +98,8 @@ class CloudRunner extends runner("cloud") {
|
|
|
98
98
|
const selectedName = await select({
|
|
99
99
|
message: "Select the remote env server",
|
|
100
100
|
choices: [
|
|
101
|
-
...serverEntries.map(([name,
|
|
102
|
-
name: `${name} (${
|
|
101
|
+
...serverEntries.map(([name, config]) => ({
|
|
102
|
+
name: `${name} (${config.username ? `${config.username}@` : ""}${config.host}${config.port ? `:${config.port}` : ""})`,
|
|
103
103
|
value: name
|
|
104
104
|
})),
|
|
105
105
|
{ name: "Add new remote server", value: addRemoteEnvServerValue },
|
|
@@ -203,12 +203,12 @@ ${chalk.green("\u27A4")} Authentication Required`));
|
|
|
203
203
|
const MAX_RETRY = 300;
|
|
204
204
|
for (let i = 0;i < MAX_RETRY; i++) {
|
|
205
205
|
const accessToken = await cloudApi.getRemoteAuthToken(remoteId);
|
|
206
|
-
const
|
|
207
|
-
if (accessToken &&
|
|
208
|
-
await GlobalConfig.setHostConfig({ host: config.host, auth: { accessToken, self
|
|
206
|
+
const self = await cloudApi.getRemoteSelf();
|
|
207
|
+
if (accessToken && self) {
|
|
208
|
+
await GlobalConfig.setHostConfig({ host: config.host, auth: { accessToken, self } });
|
|
209
209
|
Logger.rawLog(chalk.green(`\r\u2713 Authentication successful!`));
|
|
210
210
|
Logger.rawLog(chalk.green.bold(`
|
|
211
|
-
\u2728 Welcome aboard, ${
|
|
211
|
+
\u2728 Welcome aboard, ${self.nickname ?? "anonymous"}!`));
|
|
212
212
|
Logger.rawLog(chalk.dim(`You're now ready to use Akan CLI!
|
|
213
213
|
`));
|
|
214
214
|
return true;
|
|
@@ -253,12 +253,12 @@ ${chalk.green("\u27A4")} Authentication Required`));
|
|
|
253
253
|
const isOfficialRelease = !devPatchVersion;
|
|
254
254
|
const targetVersionPrefix = isOfficialRelease ? `${majorVersion}.${minorVersion}` : `${majorVersion}.${minorVersion}.${patchVersion}`;
|
|
255
255
|
const tag = distTag ?? (isOfficialRelease ? "latest" : patchVersion.split("-").at(1) ?? "dev");
|
|
256
|
-
const getNextVersion = async (prefix,
|
|
256
|
+
const getNextVersion = async (prefix, tag) => {
|
|
257
257
|
try {
|
|
258
|
-
const
|
|
259
|
-
const latestPatch =
|
|
260
|
-
const
|
|
261
|
-
return { nextVersion
|
|
258
|
+
const latestPublishedVersion = await getLatestPackageVersion("akanjs", tag, registry);
|
|
259
|
+
const latestPatch = latestPublishedVersion.startsWith(prefix) ? parseInt(latestPublishedVersion.split(".").at(-1) ?? "-1") : -1;
|
|
260
|
+
const nextVersion = `${prefix}.${latestPatch + 1}`;
|
|
261
|
+
return { nextVersion, latestPublishedVersion };
|
|
262
262
|
} catch {
|
|
263
263
|
return { nextVersion: `${prefix}.0`, latestPublishedVersion: null };
|
|
264
264
|
}
|
|
@@ -37,10 +37,10 @@ var resolveMobileTargets = async (app, selection) => {
|
|
|
37
37
|
if (!selection && targets.length === 1)
|
|
38
38
|
return targets;
|
|
39
39
|
if (!selection) {
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
return resolveMobileTargets(app,
|
|
43
|
-
throw new Error(`Multiple mobile targets found for ${app.name}. Pass --target <${
|
|
40
|
+
const choices = await getMobileTargetChoices(app);
|
|
41
|
+
if (choices.length === 1)
|
|
42
|
+
return resolveMobileTargets(app, choices[0]);
|
|
43
|
+
throw new Error(`Multiple mobile targets found for ${app.name}. Pass --target <${choices.join("|")}|all>.`);
|
|
44
44
|
}
|
|
45
45
|
if (selection === "all") {
|
|
46
46
|
if (Object.keys(config.mobile.targets).length > 1)
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
AkanContextAnalyzer
|
|
4
|
-
} from "./index-w0g7hcr7.js";
|
|
5
|
-
import {
|
|
6
|
-
Prompter
|
|
7
|
-
} from "./index-k7731a4v.js";
|
|
8
2
|
import {
|
|
9
3
|
runner,
|
|
10
4
|
script
|
|
11
|
-
} from "./index-
|
|
5
|
+
} from "./index-ft1sfjz0.js";
|
|
12
6
|
import {
|
|
13
|
-
AGENT_BLOCK_END,
|
|
14
7
|
AGENT_BLOCK_START,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
LibExecutor,
|
|
8
|
+
AGENT_BLOCK_END,
|
|
9
|
+
stampBlockVersion,
|
|
18
10
|
readDevkitVersion,
|
|
11
|
+
upsertAgentBlock,
|
|
19
12
|
renderRecipeEntries,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
CLAUDE_COMMENT_RULE,
|
|
14
|
+
AppExecutor,
|
|
15
|
+
LibExecutor
|
|
16
|
+
} from "./index-k1n0h7dk.js";
|
|
23
17
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} from "./index-
|
|
18
|
+
collectRecipeSources2,
|
|
19
|
+
scanRecipes2
|
|
20
|
+
} from "./index-by5gpp8x.js";
|
|
21
|
+
import {
|
|
22
|
+
AkanContextAnalyzer
|
|
23
|
+
} from "./index-5y7qba1c.js";
|
|
24
|
+
import {
|
|
25
|
+
Prompter
|
|
26
|
+
} from "./index-h7yw2z9n.js";
|
|
27
27
|
|
|
28
28
|
// pkgs/@akanjs/cli/agent/agent.script.ts
|
|
29
29
|
import { Logger as Logger2 } from "akanjs/common";
|
|
@@ -77,8 +77,8 @@ Keep a sample only while you are still learning its pattern; delete it once your
|
|
|
77
77
|
`;
|
|
78
78
|
};
|
|
79
79
|
var renderRecipeIndex = async (workspace) => {
|
|
80
|
-
const sources = await
|
|
81
|
-
const recipes =
|
|
80
|
+
const sources = await collectRecipeSources2(`${workspace.workspaceRoot}/pkgs/akanjs/ui`, "akanjs/ui", "recipe");
|
|
81
|
+
const recipes = scanRecipes2(sources);
|
|
82
82
|
const scopeIndexPointer = `App and lib recipes are **not** listed here. Each app/lib carries its own generated index \u2014
|
|
83
83
|
\`apps/<app>/AGENTS.md\` / \`libs/<lib>/AGENTS.md\` (\`## Recipes In Scope\`) \u2014 regenerated by \`akan sync\` and
|
|
84
84
|
verified by \`akan lint\`. When working inside an app or lib, consult that file before consuming or authoring a look.`;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
workflowRunArtifactPath,
|
|
4
|
-
workflowSyncDir
|
|
5
|
-
} from "./index-6w77v5df.js";
|
|
6
|
-
import {
|
|
7
|
-
AppExecutor,
|
|
8
|
-
LibExecutor,
|
|
9
3
|
extractBlockVersion,
|
|
10
|
-
isScannedRootEntry,
|
|
11
4
|
readDevkitVersion,
|
|
5
|
+
rootAllowedFiles,
|
|
12
6
|
rootAllowedDirs,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
findInlineRecipeDuplicates,
|
|
18
|
-
scanRecipes
|
|
19
|
-
} from "./index-xys926f2.js";
|
|
7
|
+
isScannedRootEntry,
|
|
8
|
+
AppExecutor,
|
|
9
|
+
LibExecutor
|
|
10
|
+
} from "./index-k1n0h7dk.js";
|
|
20
11
|
import {
|
|
21
12
|
FileSys
|
|
22
|
-
} from "./index-
|
|
13
|
+
} from "./index-ayy5ecax.js";
|
|
14
|
+
import {
|
|
15
|
+
collectRecipeSources2,
|
|
16
|
+
scanRecipes2,
|
|
17
|
+
findInlineRecipeDuplicates2
|
|
18
|
+
} from "./index-by5gpp8x.js";
|
|
19
|
+
import {
|
|
20
|
+
workflowRunArtifactPath,
|
|
21
|
+
workflowSyncDir
|
|
22
|
+
} from "./index-saheq2bs.js";
|
|
23
23
|
|
|
24
24
|
// pkgs/@akanjs/devkit/akanContext.ts
|
|
25
25
|
import { readdir } from "fs/promises";
|
|
@@ -493,10 +493,10 @@ class AkanContextAnalyzer {
|
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
for (const sys of [...context.apps, ...context.libs]) {
|
|
496
|
-
const sources = await
|
|
496
|
+
const sources = await collectRecipeSources2(path.join(workspace.workspaceRoot, sys.path, "ui"), "ui");
|
|
497
497
|
if (sources.length === 0)
|
|
498
498
|
continue;
|
|
499
|
-
const recipes =
|
|
499
|
+
const recipes = scanRecipes2(sources);
|
|
500
500
|
const files = [];
|
|
501
501
|
const glob = new Bun.Glob("**/*.tsx");
|
|
502
502
|
for await (const abs of glob.scan({ cwd: path.join(workspace.workspaceRoot, sys.path), absolute: true })) {
|
|
@@ -507,7 +507,7 @@ class AkanContextAnalyzer {
|
|
|
507
507
|
content: await Bun.file(abs).text().catch(() => "")
|
|
508
508
|
});
|
|
509
509
|
}
|
|
510
|
-
const duplicates =
|
|
510
|
+
const duplicates = findInlineRecipeDuplicates2(recipes, files);
|
|
511
511
|
if (duplicates.length === 0)
|
|
512
512
|
continue;
|
|
513
513
|
const preview = duplicates.slice(0, 3).map((duplicate) => `${path.relative(workspace.workspaceRoot, duplicate.path)}:${duplicate.line}`).join(", ");
|
|
@@ -518,7 +518,7 @@ class AkanContextAnalyzer {
|
|
|
518
518
|
message: `${sys.name}: ${duplicates.length} inline className(s) re-author a recipe fingerprint (${preview}${duplicates.length > 3 ? ", \u2026" : ""}) \u2014 consume the recipe instead.`
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
|
-
const scanNames = async (uiDirPath, basename) => new Set(
|
|
521
|
+
const scanNames = async (uiDirPath, basename) => new Set(scanRecipes2(await collectRecipeSources2(uiDirPath, "ui", basename)).map((info) => info.name));
|
|
522
522
|
const declaredByImport = new Map;
|
|
523
523
|
declaredByImport.set("akanjs/ui", await scanNames(path.join(workspace.workspaceRoot, "pkgs/akanjs/ui"), "recipe"));
|
|
524
524
|
for (const sys of [...context.apps, ...context.libs])
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
// pkgs/@akanjs/devkit/getDirname.ts
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
|
-
var
|
|
5
|
+
var getDirname2 = (url) => path.dirname(fileURLToPath(url));
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { getDirname2 };
|
|
@@ -5,7 +5,7 @@ import * as path from "path";
|
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import * as ts from "typescript";
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class TypeChecker2 {
|
|
9
9
|
configPath;
|
|
10
10
|
configFile;
|
|
11
11
|
config;
|
|
@@ -148,7 +148,7 @@ ${summary.join(", ")} found${output.join(`
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
static checkProject(configPath) {
|
|
151
|
-
const parsedConfig =
|
|
151
|
+
const parsedConfig = TypeChecker2.parseConfig(configPath);
|
|
152
152
|
const host = ts.createIncrementalCompilerHost(parsedConfig.options);
|
|
153
153
|
const builderProgram = ts.createIncrementalProgram({
|
|
154
154
|
rootNames: parsedConfig.fileNames,
|
|
@@ -166,19 +166,19 @@ ${summary.join(", ")} found${output.join(`
|
|
|
166
166
|
diagnostics,
|
|
167
167
|
errors,
|
|
168
168
|
warnings,
|
|
169
|
-
message:
|
|
169
|
+
message: TypeChecker2.formatDiagnosticMessages(diagnostics)
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
static parseConfig(configPath) {
|
|
173
173
|
const configFile = ts.readConfigFile(configPath, (fileName) => ts.sys.readFile(fileName));
|
|
174
174
|
const configDiagnostics = configFile.error ? [configFile.error] : [];
|
|
175
175
|
if (!configFile.config) {
|
|
176
|
-
const message =
|
|
176
|
+
const message = TypeChecker2.formatDiagnosticMessages(configDiagnostics);
|
|
177
177
|
throw new Error(message || `Error reading tsconfig.json: ${configPath}`);
|
|
178
178
|
}
|
|
179
179
|
const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, path.dirname(configPath), undefined, configPath);
|
|
180
180
|
if (parsedConfig.errors.length > 0)
|
|
181
|
-
throw new Error(
|
|
181
|
+
throw new Error(TypeChecker2.formatDiagnosticMessages(parsedConfig.errors));
|
|
182
182
|
return parsedConfig;
|
|
183
183
|
}
|
|
184
184
|
static formatDiagnosticMessages(diagnostics) {
|
|
@@ -190,4 +190,4 @@ ${summary.join(", ")} found${output.join(`
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
export {
|
|
193
|
+
export { TypeChecker2 };
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-ft1sfjz0.js";
|
|
6
6
|
import {
|
|
7
7
|
PkgExecutor
|
|
8
|
-
} from "./index-
|
|
9
|
-
import {
|
|
10
|
-
TypeScriptDependencyScanner
|
|
11
|
-
} from "./index-h5sr2nnj.js";
|
|
8
|
+
} from "./index-k1n0h7dk.js";
|
|
12
9
|
import {
|
|
13
10
|
FileSys
|
|
14
|
-
} from "./index-
|
|
11
|
+
} from "./index-ayy5ecax.js";
|
|
12
|
+
import {
|
|
13
|
+
TypeScriptDependencyScanner2
|
|
14
|
+
} from "./index-mfm35dhh.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/package/package.runner.ts
|
|
17
17
|
import path2 from "path";
|
|
@@ -150,7 +150,7 @@ class PackageRunner extends runner("package") {
|
|
|
150
150
|
async buildPackage(pkg) {
|
|
151
151
|
await $`rm -rf ${pkg.dist.cwdPath}`;
|
|
152
152
|
await pkg.dist.mkdir(pkg.dist.cwdPath);
|
|
153
|
-
const scanner = await
|
|
153
|
+
const scanner = await TypeScriptDependencyScanner2.from(pkg);
|
|
154
154
|
const { npmDeps, npmDevDeps, missingDeps } = await scanner.getPackageBuildDependencies(pkg.name);
|
|
155
155
|
const packageRuntimeDependencies = {
|
|
156
156
|
"@akanjs/devkit": ["tailwind-scrollbar"]
|
|
@@ -9,7 +9,7 @@ class FileSys {
|
|
|
9
9
|
return await Bun.file(path).exists();
|
|
10
10
|
}
|
|
11
11
|
static async dirExists(path) {
|
|
12
|
-
return await stat(path).then((
|
|
12
|
+
return await stat(path).then((stat) => stat.isDirectory()).catch(() => false);
|
|
13
13
|
}
|
|
14
14
|
static async exists(path) {
|
|
15
15
|
return await stat(path).then(() => true).catch(() => false);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CommandExecutionError
|
|
4
|
+
} from "./index-k1n0h7dk.js";
|
|
2
5
|
import {
|
|
3
6
|
resolveMobilePath,
|
|
4
7
|
targetHtmlFilename
|
|
5
|
-
} from "./index-
|
|
6
|
-
import {
|
|
7
|
-
CommandExecutionError
|
|
8
|
-
} from "./index-zkrzv21w.js";
|
|
8
|
+
} from "./index-47pj3aee.js";
|
|
9
9
|
|
|
10
10
|
// pkgs/@akanjs/devkit/capacitorApp.ts
|
|
11
11
|
import { cp, mkdir, readFile, rm, writeFile } from "fs/promises";
|
|
@@ -474,7 +474,7 @@ var PLACEHOLDER_APP_IDS = [
|
|
|
474
474
|
"com.example.myapp"
|
|
475
475
|
];
|
|
476
476
|
var placeholderAppIdSegment = /^(example|examples|myorg|myapp|mycompany|myorganization|changeme|todo|sample|test)$/;
|
|
477
|
-
var
|
|
477
|
+
var isPlaceholderAppId2 = (appId) => {
|
|
478
478
|
const normalized = appId?.trim().toLowerCase() ?? "";
|
|
479
479
|
if (!normalized)
|
|
480
480
|
return true;
|
|
@@ -641,7 +641,7 @@ function materializeCapacitorConfig(target, { operation, localServerUrl, localIp
|
|
|
641
641
|
return config;
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
class
|
|
644
|
+
class CapacitorApp2 {
|
|
645
645
|
app;
|
|
646
646
|
target;
|
|
647
647
|
project;
|
|
@@ -1513,4 +1513,4 @@ ${filter}$1`);
|
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
|
-
export {
|
|
1516
|
+
export { isPlaceholderAppId2, CapacitorApp2 };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// pkgs/@akanjs/devkit/recipeScanner.ts
|
|
3
3
|
import { readdir } from "fs/promises";
|
|
4
4
|
import ts from "typescript";
|
|
5
|
-
var
|
|
5
|
+
var collectRecipeSources2 = async (uiDirPath, importFrom, basename = "Recipe") => {
|
|
6
6
|
const read = async (filePath) => {
|
|
7
7
|
const content = await Bun.file(filePath).text().catch(() => "");
|
|
8
8
|
return content ? { path: filePath, content, importFrom } : null;
|
|
@@ -12,7 +12,7 @@ var collectRecipeSources = async (uiDirPath, importFrom, basename = "Recipe") =>
|
|
|
12
12
|
const fromDir = await Promise.all(dirEntries.filter((entry) => entry.endsWith(".ts") && entry !== "index.ts" && !/\.(test|spec)\.ts$/.test(entry)).sort().map((entry) => read(`${uiDirPath}/${basename}/${entry}`)));
|
|
13
13
|
return [flat, ...fromDir].filter((source) => !!source);
|
|
14
14
|
};
|
|
15
|
-
var
|
|
15
|
+
var scanRecipes2 = (sources) => {
|
|
16
16
|
const recipes = [];
|
|
17
17
|
for (const source of sources) {
|
|
18
18
|
const sourceFile = ts.createSourceFile(source.path, source.content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
|
|
@@ -87,7 +87,7 @@ var isNamed = (name) => ts.isIdentifier(name) || ts.isStringLiteral(name);
|
|
|
87
87
|
var propName = (name) => name.text;
|
|
88
88
|
var DUPLICATE_TOKEN_RATIO = 0.7;
|
|
89
89
|
var MIN_FINGERPRINT_TOKENS = 3;
|
|
90
|
-
var
|
|
90
|
+
var findInlineRecipeDuplicates2 = (recipes, files) => {
|
|
91
91
|
const fingerprints = recipes.map((recipe) => ({ recipe: recipe.name, tokens: (recipe.base ?? "").split(/\s+/).filter(Boolean) })).filter((fingerprint) => fingerprint.tokens.length >= MIN_FINGERPRINT_TOKENS).map((fingerprint) => ({ ...fingerprint, needed: Math.ceil(fingerprint.tokens.length * DUPLICATE_TOKEN_RATIO) }));
|
|
92
92
|
if (fingerprints.length === 0)
|
|
93
93
|
return [];
|
|
@@ -133,4 +133,4 @@ var getLeadingDoc = (fullText, node) => {
|
|
|
133
133
|
return line || undefined;
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
export {
|
|
136
|
+
export { collectRecipeSources2, scanRecipes2, findInlineRecipeDuplicates2 };
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./index-
|
|
3
|
+
script
|
|
4
|
+
} from "./index-ft1sfjz0.js";
|
|
5
|
+
import {
|
|
6
|
+
AppExecutor,
|
|
7
|
+
LibExecutor,
|
|
8
|
+
ModuleExecutor
|
|
9
|
+
} from "./index-k1n0h7dk.js";
|
|
5
10
|
import {
|
|
6
|
-
addFieldUiPolicyForType,
|
|
7
|
-
coerceFieldDefault,
|
|
8
11
|
compactDiagnostics,
|
|
9
12
|
createPrimitiveWriteReport,
|
|
13
|
+
sourceFile,
|
|
14
|
+
moduleComponentName,
|
|
15
|
+
moduleSourcePaths,
|
|
16
|
+
generatedFilesForSync,
|
|
17
|
+
validationCommandsForTarget,
|
|
18
|
+
nextActionsForTarget,
|
|
19
|
+
lowerlize,
|
|
20
|
+
normalizeFieldType,
|
|
10
21
|
ensureBaseTypeImport,
|
|
11
|
-
|
|
12
|
-
ensureEnumImport,
|
|
22
|
+
coerceFieldDefault,
|
|
13
23
|
fieldExpression,
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
viaBuilderParameterName,
|
|
25
|
+
insertIntoObject,
|
|
26
|
+
insertLightProjectionField,
|
|
27
|
+
insertTemplateField,
|
|
28
|
+
ensureEnumImport,
|
|
29
|
+
insertEnumClass,
|
|
30
|
+
insertDictionaryModelField,
|
|
16
31
|
hasConstantInputField,
|
|
17
32
|
hasDictionaryModelField,
|
|
18
|
-
|
|
33
|
+
ensureConstantTypeImport,
|
|
34
|
+
insertDictionaryEnum,
|
|
35
|
+
parseValues,
|
|
19
36
|
hasSourceParseErrors,
|
|
37
|
+
hasClassMethod,
|
|
20
38
|
insertClassMethod,
|
|
21
|
-
|
|
22
|
-
insertDictionaryModelField,
|
|
23
|
-
insertEnumClass,
|
|
24
|
-
insertIntoObject,
|
|
25
|
-
insertLightProjectionField,
|
|
39
|
+
hasSignalFactoryEntry,
|
|
26
40
|
insertSignalFactoryEntry,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
moduleComponentName,
|
|
30
|
-
moduleSourcePaths,
|
|
31
|
-
nextActionsForTarget,
|
|
32
|
-
normalizeFieldType,
|
|
33
|
-
parseValues,
|
|
34
|
-
sourceFile,
|
|
35
|
-
validationCommandsForTarget,
|
|
36
|
-
viaBuilderParameterName
|
|
37
|
-
} from "./index-6w77v5df.js";
|
|
41
|
+
addFieldUiPolicyForType
|
|
42
|
+
} from "./index-saheq2bs.js";
|
|
38
43
|
import {
|
|
39
|
-
|
|
40
|
-
} from "./index-
|
|
41
|
-
import {
|
|
42
|
-
AppExecutor,
|
|
43
|
-
LibExecutor,
|
|
44
|
-
ModuleExecutor
|
|
45
|
-
} from "./index-zkrzv21w.js";
|
|
44
|
+
ModuleScript
|
|
45
|
+
} from "./index-k86zc21w.js";
|
|
46
46
|
|
|
47
47
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
48
48
|
import { capitalize } from "akanjs/common";
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./index-
|
|
5
|
-
import {
|
|
6
|
-
WorkflowRunner
|
|
7
|
-
} from "./index-egng0kc4.js";
|
|
8
|
-
import {
|
|
9
|
-
ScalarScript
|
|
10
|
-
} from "./index-ta1mk0xh.js";
|
|
11
|
-
import {
|
|
12
|
-
PrimitiveScript
|
|
13
|
-
} from "./index-47zynjx7.js";
|
|
14
|
-
import {
|
|
15
|
-
ModuleScript
|
|
16
|
-
} from "./index-pj3hk9kt.js";
|
|
3
|
+
AppExecutor
|
|
4
|
+
} from "./index-k1n0h7dk.js";
|
|
17
5
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
jsonText,
|
|
7
|
+
createWorkflowBaselineSummary,
|
|
8
|
+
buildAkanModuleContextIndex,
|
|
9
|
+
createWorkflowStepRegistry,
|
|
10
|
+
toolingRolloutGate
|
|
11
|
+
} from "./index-saheq2bs.js";
|
|
20
12
|
import {
|
|
21
|
-
AkanContextAnalyzer,
|
|
22
|
-
akanMcpInstallConfigPaths,
|
|
23
|
-
akanMcpInstallTargets,
|
|
24
13
|
buildResourceList,
|
|
25
14
|
codexMcpConfigPath,
|
|
26
|
-
|
|
15
|
+
akanMcpInstallTargets,
|
|
16
|
+
akanMcpInstallConfigPaths,
|
|
27
17
|
createAkanMcpServer,
|
|
18
|
+
createAkanCodexMcpServerBlock,
|
|
19
|
+
upsertCodexMcpServerBlock,
|
|
28
20
|
renderDoctorText,
|
|
29
|
-
|
|
30
|
-
} from "./index-
|
|
21
|
+
AkanContextAnalyzer
|
|
22
|
+
} from "./index-5y7qba1c.js";
|
|
23
|
+
import {
|
|
24
|
+
CommandContainer,
|
|
25
|
+
runner,
|
|
26
|
+
script
|
|
27
|
+
} from "./index-ft1sfjz0.js";
|
|
28
|
+
import {
|
|
29
|
+
isPlaceholderAppId2
|
|
30
|
+
} from "./index-b2nt0w0k.js";
|
|
31
31
|
import {
|
|
32
32
|
Prompter
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-h7yw2z9n.js";
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
createWorkflowStepRegistry,
|
|
38
|
-
jsonText,
|
|
39
|
-
toolingRolloutGate
|
|
40
|
-
} from "./index-6w77v5df.js";
|
|
35
|
+
RepairRunner
|
|
36
|
+
} from "./index-qcracvc9.js";
|
|
41
37
|
import {
|
|
42
|
-
|
|
43
|
-
} from "./index-
|
|
38
|
+
WorkflowRunner
|
|
39
|
+
} from "./index-j9vnq8tr.js";
|
|
44
40
|
import {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
script
|
|
48
|
-
} from "./index-1szrbtj9.js";
|
|
41
|
+
ModuleScript
|
|
42
|
+
} from "./index-k86zc21w.js";
|
|
49
43
|
import {
|
|
50
|
-
|
|
51
|
-
} from "./index-
|
|
44
|
+
PrimitiveScript
|
|
45
|
+
} from "./index-cd5x18qh.js";
|
|
46
|
+
import {
|
|
47
|
+
ScalarScript
|
|
48
|
+
} from "./index-v0s24t8j.js";
|
|
49
|
+
import {
|
|
50
|
+
getMobileTargets
|
|
51
|
+
} from "./index-47pj3aee.js";
|
|
52
52
|
|
|
53
53
|
// pkgs/@akanjs/cli/context/context.script.ts
|
|
54
54
|
import { Logger } from "akanjs/common";
|
|
@@ -669,7 +669,7 @@ class ContextRunner extends runner("context") {
|
|
|
669
669
|
if (!config.hasMobileConfig)
|
|
670
670
|
continue;
|
|
671
671
|
for (const { name, config: target } of await getMobileTargets(app)) {
|
|
672
|
-
if (!
|
|
672
|
+
if (!isPlaceholderAppId2(target.appId))
|
|
673
673
|
continue;
|
|
674
674
|
diagnostics.push({
|
|
675
675
|
severity: "warning",
|
|
@@ -783,7 +783,7 @@ class ContextRunner extends runner("context") {
|
|
|
783
783
|
if (name === "explain_command")
|
|
784
784
|
return this.explainCommand(stringArg(args, "command"));
|
|
785
785
|
if (name === "get_validation_contract")
|
|
786
|
-
return createAkanValidationContract((
|
|
786
|
+
return createAkanValidationContract((mode) => this.listMcpTools(mode));
|
|
787
787
|
if (name === "list_workflows")
|
|
788
788
|
return parseJsonOutput(new WorkflowRunner().list({ format: "json" }));
|
|
789
789
|
if (name === "explain_workflow")
|