@akanjs/cli 3.2.0-rc.12 → 3.2.0-rc.13
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-cr8pvdmv.js → CodeAgent-yd1f54yf.js} +2 -2
- package/{CodeTui-89ssa9rr.js → CodeTui-h7mksphk.js} +1 -1
- package/TunnelShare-hrjed2jf.js +19 -0
- package/{agent.command-rp9hpf0v.js → agent.command-hrc2dfas.js} +19 -15
- package/akanCode.js +2 -2
- package/appExecutor-0ssszyhf.js +11 -0
- package/{application.command-fydjdvce.js → application.command-b2194cpv.js} +15 -11
- package/{applicationBuildRunner-68sph7t4.js → applicationBuildRunner-gg03kydg.js} +12 -8
- package/buildBatch.proc.js +14 -9
- package/{cloud.command-0y1gg3sb.js → cloud.command-d8ps1564.js} +20 -16
- package/cloud.script-7j7w4m0w.js +35 -0
- package/{code.command-63fcz7a3.js → code.command-6h6jr0s7.js} +10 -6
- package/{context.command-pgwcx0na.js → context.command-t8akxhny.js} +20 -16
- package/context.runner-eawk1n8e.js +34 -0
- package/{guideline.command-6yz6d4hf.js → guideline.command-f41b5nv5.js} +6 -2
- package/guidelines/agentRule/agentRule.instruction.md +12 -2
- package/guidelines/akanApi/akanApi.instruction.md +1 -1
- package/guidelines/pageRule/pageRule.instruction.md +6 -1
- package/guidelines/runtimeRule/runtimeRule.instruction.md +2 -1
- package/incrementalBuilder.proc.js +12 -7
- package/{index-c3r23w24.js → index-1b1p83vq.js} +3 -3
- package/index-1jzdengt.js +30 -0
- package/{index-aybfcx58.js → index-2z8mxgs7.js} +6 -6
- package/{index-t8h09yjs.js → index-37k5vshx.js} +10 -8
- package/{index-frvjq1rd.js → index-3fbmyb2r.js} +1 -1
- package/{index-h0s3cjm0.js → index-3fn13v8p.js} +4 -4
- package/{index-axe04yqm.js → index-3fpv5v0t.js} +15 -11
- package/{index-23d8gw08.js → index-3gmskeq2.js} +37 -29
- package/{index-bper31wr.js → index-5np8zpep.js} +12 -8
- package/{index-41mfhgq0.js → index-66jt3m30.js} +1 -1
- package/{index-097bjwvm.js → index-6dwk5aej.js} +8 -8
- package/{index-qwzwzmvf.js → index-71z3pdsn.js} +4 -4
- package/{index-p54s83sz.js → index-8bkbexcy.js} +1 -1
- package/{index-cqrndcq0.js → index-8rmg8c0y.js} +3 -3
- package/{index-s0w78805.js → index-9w51aevd.js} +1 -1
- package/{index-bmscnt1t.js → index-9yfssbgg.js} +25 -19
- package/{index-adj7qmz9.js → index-asfx2dhe.js} +13 -9
- package/index-b3h37zk3.js +787 -0
- package/{index-wm4385pm.js → index-bb7cm060.js} +10 -10
- package/{index-6r5f768n.js → index-c0rnjeqn.js} +11 -9
- package/{index-apcr1qgk.js → index-c4k6e098.js} +19 -15
- package/{index-sq9d0jhj.js → index-crtscw7c.js} +2710 -3615
- package/{index-ahk6rvth.js → index-e599a0e4.js} +1 -1
- package/{index-6fnrhpn1.js → index-f5j09jnj.js} +5 -5
- package/{index-3m2cd8mm.js → index-g2ebpf0y.js} +6 -6
- package/{index-hf9nvwam.js → index-hbc0t3ng.js} +2 -2
- package/{index-cswgczrv.js → index-hg8s6nae.js} +9 -9
- package/{index-pcprf7ft.js → index-hpe12v1h.js} +1 -1
- package/{index-dfsa009c.js → index-j2me5hm4.js} +8 -6
- package/{index-e5f6czck.js → index-j33b0n38.js} +1 -1
- package/{index-mmgtnh44.js → index-k081wv4r.js} +1428 -1106
- package/{index-bgp0h8rx.js → index-nx4q5rey.js} +3 -3
- package/index-rx8r0cbe.js +18 -0
- package/{index-k2r3hmbz.js → index-vb8gd135.js} +21 -15
- package/{index-6js9ek5c.js → index-vy50ec2q.js} +2 -2
- package/index-x2bj2vyz.js +127 -0
- package/{index-wpgtyek3.js → index-xb1yh9km.js} +1 -1
- package/{index-70jkxbf6.js → index-xjj0h74q.js} +2 -2
- package/index.js +27 -23
- package/libExecutor-ex8jqksz.js +10 -0
- package/{library.command-kc1zahcg.js → library.command-a9p5yg4k.js} +7 -3
- package/{localRegistry.command-yz150pcw.js → localRegistry.command-zz64k5vy.js} +23 -18
- package/{module.command-cchwzz9r.js → module.command-1ht6dmxg.js} +9 -5
- package/{package.command-qcjajpv8.js → package.command-eabq20aq.js} +8 -4
- package/package.json +2 -2
- package/{page.command-1t86dx8a.js → page.command-xhmzmvjn.js} +7 -3
- package/{pipeline.command-2xx9z3d0.js → pipeline.command-wsbg3fpr.js} +11 -6
- package/pkgExecutor-d16x1xcb.js +10 -0
- package/{primitive.command-mc0x8txr.js → primitive.command-yyxtfhvq.js} +10 -6
- package/{projectTypecheck-tz497yx7.js → projectTypecheck-wcrt7sae.js} +1 -1
- package/{quality.command-11rayf5c.js → quality.command-n7hmt628.js} +16 -10
- package/{repair.command-8w41vy78.js → repair.command-pczdq4mv.js} +9 -5
- package/{scalar.command-rvwh98ny.js → scalar.command-cw3d32sv.js} +8 -4
- package/{subspace.command-ykxertx8.js → subspace.command-d8t8geyv.js} +17 -12
- package/{tunnel.command-qbcbj0vq.js → tunnel.command-mhm64m9n.js} +15 -11
- package/{verify.command-gvveq05z.js → verify.command-j4he0fbx.js} +16 -12
- package/{workflow.command-yp9ajthb.js → workflow.command-k064waza.js} +14 -10
- package/{workspace.command-jm7emxjh.js → workspace.command-pkpawft5.js} +47 -41
- package/TunnelShare-ndb5cts1.js +0 -15
- package/cloud.script-ewk72b3g.js +0 -31
- package/context.runner-5s2ytkjj.js +0 -30
|
@@ -3,14 +3,18 @@ import {
|
|
|
3
3
|
HmrWatcher,
|
|
4
4
|
WatchRootResolver,
|
|
5
5
|
ApplicationBuildReporter
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-66jt3m30.js";
|
|
7
7
|
import {
|
|
8
8
|
CodegenLock,
|
|
9
|
-
WorkspaceExecutor
|
|
10
|
-
|
|
11
|
-
} from "./index-sq9d0jhj.js";
|
|
9
|
+
WorkspaceExecutor
|
|
10
|
+
} from "./index-crtscw7c.js";
|
|
12
11
|
import"./index-bns3wcpc.js";
|
|
13
12
|
import"./index-j4yvgfhr.js";
|
|
13
|
+
import {
|
|
14
|
+
AppExecutor2
|
|
15
|
+
} from "./index-b3h37zk3.js";
|
|
16
|
+
import"./index-1jzdengt.js";
|
|
17
|
+
import"./index-x2bj2vyz.js";
|
|
14
18
|
import {
|
|
15
19
|
GraphClientEntryDiscovery,
|
|
16
20
|
RouteClientBuilder,
|
|
@@ -20,10 +24,10 @@ import {
|
|
|
20
24
|
DevChangePlanner,
|
|
21
25
|
DevGeneratedIndexSync,
|
|
22
26
|
SsrDevBundler
|
|
23
|
-
} from "./index-
|
|
27
|
+
} from "./index-nx4q5rey.js";
|
|
24
28
|
import {
|
|
25
29
|
ServerGraphFile
|
|
26
|
-
} from "./index-
|
|
30
|
+
} from "./index-xb1yh9km.js";
|
|
27
31
|
import"./index-nd39rssn.js";
|
|
28
32
|
import {
|
|
29
33
|
FrameworkGraph
|
|
@@ -37,6 +41,7 @@ import {
|
|
|
37
41
|
import {
|
|
38
42
|
prepareDevWatchBatch
|
|
39
43
|
} from "./index-a5vmm6x4.js";
|
|
44
|
+
import"./index-rx8r0cbe.js";
|
|
40
45
|
|
|
41
46
|
// pkgs/@akanjs/devkit/incrementalBuilder/incrementalBuilder.proc.ts
|
|
42
47
|
import { rm } from "fs/promises";
|
|
@@ -1147,7 +1152,7 @@ class IncrementalBuilder {
|
|
|
1147
1152
|
if (!workspaceRoot || !appName)
|
|
1148
1153
|
throw new Error("AKAN_WORKSPACE_ROOT or AKAN_PUBLIC_APP_NAME is not set");
|
|
1149
1154
|
const workspace = WorkspaceExecutor.fromRoot({ workspaceRoot, repoName });
|
|
1150
|
-
const app =
|
|
1155
|
+
const app = AppExecutor2.from(workspace, appName);
|
|
1151
1156
|
const watch = process.env.AKAN_WATCH !== "0";
|
|
1152
1157
|
let builder = null;
|
|
1153
1158
|
const bootingError = "builder is recovering from a failed boot build; retry after the build error is fixed";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AkanContextAnalyzer
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-5np8zpep.js";
|
|
5
5
|
import {
|
|
6
6
|
writeWorkflowRunArtifact,
|
|
7
7
|
generatedFilePathsForTarget,
|
|
8
8
|
writeGeneratedSyncState,
|
|
9
9
|
createRepairReport,
|
|
10
10
|
renderRepairReport
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-j2me5hm4.js";
|
|
12
12
|
import {
|
|
13
13
|
runner
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-3gmskeq2.js";
|
|
15
15
|
import {
|
|
16
16
|
isWorkflowSysName,
|
|
17
17
|
isWorkflowModuleName
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
execEmoji,
|
|
4
|
+
Executor,
|
|
5
|
+
SysExecutor,
|
|
6
|
+
WorkspaceExecutor,
|
|
7
|
+
AkanLibConfig
|
|
8
|
+
} from "./index-crtscw7c.js";
|
|
9
|
+
|
|
10
|
+
// pkgs/@akanjs/devkit/executors/libExecutor.ts
|
|
11
|
+
class LibExecutor2 extends SysExecutor {
|
|
12
|
+
dist;
|
|
13
|
+
emoji = execEmoji.lib;
|
|
14
|
+
constructor({ workspace, name }) {
|
|
15
|
+
super({ workspace, name, type: "lib" });
|
|
16
|
+
this.dist = new Executor(`dist/${name}`, `${this.workspace.workspaceRoot}/dist/libs/${name}`);
|
|
17
|
+
}
|
|
18
|
+
static from(executor, name) {
|
|
19
|
+
return new LibExecutor2({ workspace: executor instanceof WorkspaceExecutor ? executor : executor.workspace, name });
|
|
20
|
+
}
|
|
21
|
+
#akanConfig = null;
|
|
22
|
+
async getConfig({ refresh } = {}) {
|
|
23
|
+
if (this.#akanConfig && !refresh)
|
|
24
|
+
return this.#akanConfig;
|
|
25
|
+
this.#akanConfig = await AkanLibConfig.from(this, { bustImportCache: refresh });
|
|
26
|
+
return this.#akanConfig;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { LibExecutor2 };
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
6
|
-
import {
|
|
7
|
-
ModuleExecutor
|
|
8
|
-
} from "./index-sq9d0jhj.js";
|
|
5
|
+
} from "./index-3gmskeq2.js";
|
|
9
6
|
import {
|
|
10
7
|
sourceFile,
|
|
11
8
|
moduleSourcePaths,
|
|
@@ -13,16 +10,19 @@ import {
|
|
|
13
10
|
createPassedPrimitiveReport,
|
|
14
11
|
bilingualLabelForField,
|
|
15
12
|
bilingualDescriptionForField
|
|
16
|
-
} from "./index-
|
|
13
|
+
} from "./index-j2me5hm4.js";
|
|
17
14
|
import {
|
|
18
15
|
PageScript
|
|
19
|
-
} from "./index-
|
|
16
|
+
} from "./index-8bkbexcy.js";
|
|
20
17
|
import {
|
|
21
18
|
pluralizeName
|
|
22
19
|
} from "./index-nz8prx9g.js";
|
|
23
20
|
import {
|
|
24
21
|
assertPlainName
|
|
25
22
|
} from "./index-va90m8nd.js";
|
|
23
|
+
import {
|
|
24
|
+
ModuleExecutor
|
|
25
|
+
} from "./index-rx8r0cbe.js";
|
|
26
26
|
|
|
27
27
|
// pkgs/@akanjs/cli/module/module.script.ts
|
|
28
28
|
import { capitalize as capitalize2 } from "akanjs/common";
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-3gmskeq2.js";
|
|
6
6
|
import {
|
|
7
|
-
LibSource,
|
|
8
|
-
formatLibStatuses,
|
|
9
7
|
CommandExecutionError,
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
LibSource,
|
|
9
|
+
formatLibStatuses
|
|
10
|
+
} from "./index-crtscw7c.js";
|
|
11
|
+
import {
|
|
12
|
+
LibExecutor2
|
|
13
|
+
} from "./index-1jzdengt.js";
|
|
12
14
|
import {
|
|
13
15
|
assertPlainName
|
|
14
16
|
} from "./index-va90m8nd.js";
|
|
@@ -46,7 +48,7 @@ class LibraryRunner extends runner("library") {
|
|
|
46
48
|
async createLibrary(libName, workspace) {
|
|
47
49
|
await workspace.mkdir(`libs/${libName}`);
|
|
48
50
|
await workspace.applyTemplate({ basePath: `libs/${libName}`, template: "libRoot", dict: { libName } });
|
|
49
|
-
return
|
|
51
|
+
return LibExecutor2.from(workspace, libName);
|
|
50
52
|
}
|
|
51
53
|
async removeLibrary(lib) {
|
|
52
54
|
await lib.workspace.removeDir(`libs/${lib.name}`);
|
|
@@ -102,7 +104,7 @@ class LibraryRunner extends runner("library") {
|
|
|
102
104
|
const testingEnv = `libs/${libName}/env/env.server.testing.ts`;
|
|
103
105
|
if (!await workspace.exists(testingEnv))
|
|
104
106
|
await workspace.cp(`libs/${libName}/env/env.server.example.ts`, testingEnv);
|
|
105
|
-
const lib =
|
|
107
|
+
const lib = LibExecutor2.from(workspace, libName);
|
|
106
108
|
const stamp = await new LibSource(lib).write(source);
|
|
107
109
|
if (await workspace.hasChanges())
|
|
108
110
|
await workspace.commit(`Install ${libName} library from ${stamp.origin}`);
|
|
@@ -110,7 +112,7 @@ class LibraryRunner extends runner("library") {
|
|
|
110
112
|
}
|
|
111
113
|
async libraryStatuses(workspace) {
|
|
112
114
|
const libNames = await workspace.getLibs();
|
|
113
|
-
return await Promise.all(libNames.map((libName) => new LibSource(
|
|
115
|
+
return await Promise.all(libNames.map((libName) => new LibSource(LibExecutor2.from(workspace, libName)).status()));
|
|
114
116
|
}
|
|
115
117
|
async mergeLibraryDependencies(lib) {
|
|
116
118
|
const [libPackageJson, rootPackageJson] = await Promise.all([lib.getPackageJson(), lib.workspace.getPackageJson()]);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
akanMcpInstallTargets
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-5np8zpep.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-j2me5hm4.js";
|
|
8
8
|
import {
|
|
9
9
|
script
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-3gmskeq2.js";
|
|
11
11
|
import {
|
|
12
12
|
ContextRunner2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-bb7cm060.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/context/context.script.ts
|
|
16
16
|
import { Logger } from "akanjs/common";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
runner,
|
|
4
4
|
script,
|
|
5
5
|
markCliErrorPrinted
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-3gmskeq2.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError
|
|
9
9
|
} from "./index-j4yvgfhr.js";
|
|
@@ -14,10 +14,14 @@ import {
|
|
|
14
14
|
readDevkitVersion,
|
|
15
15
|
upsertAgentBlock,
|
|
16
16
|
renderRecipeEntries,
|
|
17
|
-
CLAUDE_COMMENT_RULE
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
CLAUDE_COMMENT_RULE
|
|
18
|
+
} from "./index-crtscw7c.js";
|
|
19
|
+
import {
|
|
20
|
+
AppExecutor2
|
|
21
|
+
} from "./index-b3h37zk3.js";
|
|
22
|
+
import {
|
|
23
|
+
LibExecutor2
|
|
24
|
+
} from "./index-1jzdengt.js";
|
|
21
25
|
import {
|
|
22
26
|
akanCodePaths2
|
|
23
27
|
} from "./index-35j83zkd.js";
|
|
@@ -27,7 +31,7 @@ import {
|
|
|
27
31
|
} from "./index-j6eeh5d7.js";
|
|
28
32
|
import {
|
|
29
33
|
AkanContextAnalyzer
|
|
30
|
-
} from "./index-
|
|
34
|
+
} from "./index-5np8zpep.js";
|
|
31
35
|
import {
|
|
32
36
|
collectRecipeSources2,
|
|
33
37
|
scanRecipes2
|
|
@@ -35,15 +39,15 @@ import {
|
|
|
35
39
|
import {
|
|
36
40
|
ApplicationRunner,
|
|
37
41
|
VerifyScope
|
|
38
|
-
} from "./index-
|
|
42
|
+
} from "./index-k081wv4r.js";
|
|
39
43
|
import {
|
|
40
44
|
WorkspaceRunner
|
|
41
|
-
} from "./index-
|
|
45
|
+
} from "./index-c4k6e098.js";
|
|
42
46
|
import {
|
|
43
47
|
VerifyComments,
|
|
44
48
|
VerifyPipeline,
|
|
45
49
|
VerifyReport
|
|
46
|
-
} from "./index-
|
|
50
|
+
} from "./index-vb8gd135.js";
|
|
47
51
|
|
|
48
52
|
// pkgs/@akanjs/cli/agent/agent.script.ts
|
|
49
53
|
import { Logger as Logger3 } from "akanjs/common";
|
|
@@ -595,9 +599,9 @@ class AgentRunner extends runner("agent") {
|
|
|
595
599
|
}
|
|
596
600
|
};
|
|
597
601
|
for (const name of libNames)
|
|
598
|
-
await syncScope(
|
|
602
|
+
await syncScope(LibExecutor2.from(workspace, name));
|
|
599
603
|
for (const name of appNames)
|
|
600
|
-
await syncScope(
|
|
604
|
+
await syncScope(AppExecutor2.from(workspace, name));
|
|
601
605
|
return written;
|
|
602
606
|
}
|
|
603
607
|
}
|
|
@@ -8,12 +8,20 @@ import {
|
|
|
8
8
|
} from "./index-bns3wcpc.js";
|
|
9
9
|
import {
|
|
10
10
|
Executor,
|
|
11
|
-
WorkspaceExecutor
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
WorkspaceExecutor
|
|
12
|
+
} from "./index-crtscw7c.js";
|
|
13
|
+
import {
|
|
14
|
+
AppExecutor2
|
|
15
|
+
} from "./index-b3h37zk3.js";
|
|
16
|
+
import {
|
|
17
|
+
LibExecutor2
|
|
18
|
+
} from "./index-1jzdengt.js";
|
|
19
|
+
import {
|
|
20
|
+
PkgExecutor2
|
|
21
|
+
} from "./index-x2bj2vyz.js";
|
|
22
|
+
import {
|
|
15
23
|
ModuleExecutor
|
|
16
|
-
} from "./index-
|
|
24
|
+
} from "./index-rx8r0cbe.js";
|
|
17
25
|
|
|
18
26
|
// pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
|
|
19
27
|
var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -514,11 +522,11 @@ var getArgumentValue = async (argMeta, value) => {
|
|
|
514
522
|
return convertArgValue(await input({ message: inputMessageOf(argMeta) }), type ?? "string");
|
|
515
523
|
};
|
|
516
524
|
var assignCommandContext = (context, argMeta, value) => {
|
|
517
|
-
if (value instanceof
|
|
525
|
+
if (value instanceof AppExecutor2)
|
|
518
526
|
context.app = value;
|
|
519
|
-
else if (value instanceof
|
|
527
|
+
else if (value instanceof LibExecutor2)
|
|
520
528
|
context.lib = value;
|
|
521
|
-
else if (value instanceof
|
|
529
|
+
else if (value instanceof PkgExecutor2)
|
|
522
530
|
context.pkg = value;
|
|
523
531
|
else if (value instanceof ModuleExecutor)
|
|
524
532
|
context.module = value;
|
|
@@ -569,15 +577,15 @@ var getAppsArgumentValue = async (value, workspace, rerun) => {
|
|
|
569
577
|
throw new Error("No apps found in this workspace (apps/<appName>/akan.config.ts)");
|
|
570
578
|
const requested = parseAppNameList(value);
|
|
571
579
|
if (requested.includes("all"))
|
|
572
|
-
return appNames.map((name) =>
|
|
580
|
+
return appNames.map((name) => AppExecutor2.from(workspace, name));
|
|
573
581
|
if (requested.length) {
|
|
574
582
|
const unknown = requested.filter((name) => !appNames.includes(name));
|
|
575
583
|
if (unknown.length)
|
|
576
584
|
throw new CliError("unknownTarget", `Unknown app${unknown.length > 1 ? "s" : ""}: ${unknown.join(", ")}. Available: ${appNames.join(", ")}, all`);
|
|
577
|
-
return [...new Set(requested)].map((name) =>
|
|
585
|
+
return [...new Set(requested)].map((name) => AppExecutor2.from(workspace, name));
|
|
578
586
|
}
|
|
579
587
|
if (appNames.length === 1 && appNames[0])
|
|
580
|
-
return [
|
|
588
|
+
return [AppExecutor2.from(workspace, appNames[0])];
|
|
581
589
|
assertPromptable("Missing apps", { choices: [...appNames, "all"], ...rerunRemedyOf(rerun, "<apps...>") });
|
|
582
590
|
const remembered = new Set(await AppSelectionMemory.read(workspace.workspaceRoot));
|
|
583
591
|
const picked = await checkbox({
|
|
@@ -586,7 +594,7 @@ var getAppsArgumentValue = async (value, workspace, rerun) => {
|
|
|
586
594
|
required: true
|
|
587
595
|
});
|
|
588
596
|
await AppSelectionMemory.write(workspace.workspaceRoot, picked);
|
|
589
|
-
return picked.map((name) =>
|
|
597
|
+
return picked.map((name) => AppExecutor2.from(workspace, name));
|
|
590
598
|
};
|
|
591
599
|
var getInternalArgumentValue = async (argMeta, value, workspace, rerun, { destructive = false } = {}) => {
|
|
592
600
|
if (argMeta.type === "Workspace")
|
|
@@ -612,18 +620,18 @@ var getInternalArgumentValue = async (argMeta, value, workspace, rerun, { destru
|
|
|
612
620
|
const pkgChoices = sysType === "exec" ? pkgNames : [];
|
|
613
621
|
const execOf = (name) => {
|
|
614
622
|
if (appNames.includes(name))
|
|
615
|
-
return
|
|
623
|
+
return AppExecutor2.from(workspace, name);
|
|
616
624
|
if (libNames.includes(name))
|
|
617
|
-
return
|
|
625
|
+
return LibExecutor2.from(workspace, name);
|
|
618
626
|
if (pkgChoices.includes(name))
|
|
619
|
-
return
|
|
627
|
+
return PkgExecutor2.from(workspace, name);
|
|
620
628
|
return null;
|
|
621
629
|
};
|
|
622
630
|
const found = value ? execOf(value) : null;
|
|
623
631
|
if (found)
|
|
624
632
|
return found;
|
|
625
633
|
if (!value && !destructive && argMeta.option?.onlyApp && appNames.length === 1 && appNames[0])
|
|
626
|
-
return
|
|
634
|
+
return AppExecutor2.from(workspace, appNames[0]);
|
|
627
635
|
const [kind, placeholder] = sysType === "exec" ? ["app, lib or pkg", "<app-lib-or-pkg>"] : ["app or lib", "<app-or-lib>"];
|
|
628
636
|
const choices = [...appNames, ...libNames, ...pkgChoices];
|
|
629
637
|
const only = takeOnly(kind, choices, execOf);
|
|
@@ -640,35 +648,35 @@ var getInternalArgumentValue = async (argMeta, value, workspace, rerun, { destru
|
|
|
640
648
|
return picked;
|
|
641
649
|
} else if (sysType === "app") {
|
|
642
650
|
if (value && appNames.includes(value))
|
|
643
|
-
return
|
|
651
|
+
return AppExecutor2.from(workspace, value);
|
|
644
652
|
if (!value && !destructive && appNames.length === 1 && appNames[0])
|
|
645
|
-
return
|
|
653
|
+
return AppExecutor2.from(workspace, appNames[0]);
|
|
646
654
|
assertAskable("app", appNames, "<app>");
|
|
647
655
|
const appName = await select({ message: `Select the ${sysType} name`, choices: appNames });
|
|
648
|
-
return
|
|
656
|
+
return AppExecutor2.from(workspace, appName);
|
|
649
657
|
} else if (sysType === "lib") {
|
|
650
658
|
if (value && libNames.includes(value))
|
|
651
|
-
return
|
|
652
|
-
const only = takeOnly("lib", libNames, (name) =>
|
|
659
|
+
return LibExecutor2.from(workspace, value);
|
|
660
|
+
const only = takeOnly("lib", libNames, (name) => LibExecutor2.from(workspace, name));
|
|
653
661
|
if (only)
|
|
654
662
|
return only;
|
|
655
663
|
assertAskable("lib", libNames, "<lib>");
|
|
656
664
|
const libName = await select({ message: `Select the ${sysType} name`, choices: libNames });
|
|
657
|
-
return
|
|
665
|
+
return LibExecutor2.from(workspace, libName);
|
|
658
666
|
} else if (sysType === "pkg") {
|
|
659
667
|
const pkgs = await workspace.getPkgs();
|
|
660
668
|
if (value && pkgs.includes(value))
|
|
661
|
-
return
|
|
662
|
-
const only = takeOnly("pkg", pkgs, (name) =>
|
|
669
|
+
return PkgExecutor2.from(workspace, value);
|
|
670
|
+
const only = takeOnly("pkg", pkgs, (name) => PkgExecutor2.from(workspace, name));
|
|
663
671
|
if (only)
|
|
664
672
|
return only;
|
|
665
673
|
assertAskable("pkg", pkgs, "<pkg>");
|
|
666
674
|
const pkgName = await select({ message: `Select the ${sysType} name`, choices: pkgs });
|
|
667
|
-
return
|
|
675
|
+
return PkgExecutor2.from(workspace, pkgName);
|
|
668
676
|
} else if (sysType === "module") {
|
|
669
677
|
const systems = [
|
|
670
|
-
...appNames.map((name) =>
|
|
671
|
-
...libNames.map((name) =>
|
|
678
|
+
...appNames.map((name) => AppExecutor2.from(workspace, name)),
|
|
679
|
+
...libNames.map((name) => LibExecutor2.from(workspace, name))
|
|
672
680
|
];
|
|
673
681
|
const modulesOf = async (sys) => [
|
|
674
682
|
...await sys.getModules(),
|
|
@@ -706,7 +714,7 @@ var getInternalArgumentValue = async (argMeta, value, workspace, rerun, { destru
|
|
|
706
714
|
...libNames.map((name) => ({ name, value: { type: "lib", name } }))
|
|
707
715
|
]
|
|
708
716
|
});
|
|
709
|
-
const executor = type === "app" ?
|
|
717
|
+
const executor = type === "app" ? AppExecutor2.from(workspace, name) : LibExecutor2.from(workspace, name);
|
|
710
718
|
const modules = await modulesOf(executor);
|
|
711
719
|
const moduleName = await select({
|
|
712
720
|
message: `Select the module name`,
|
|
@@ -836,7 +844,7 @@ ${versionWarning}`), undefined, "error");
|
|
|
836
844
|
commandArgs[argMeta.idx] = await getAppsArgumentValue(cmdArgs[argMeta.idx], workspace, rerun);
|
|
837
845
|
else
|
|
838
846
|
commandArgs[argMeta.idx] = await getInternalArgumentValue(argMeta, cmdArgs[argMeta.idx], workspace, rerun, { destructive: targetMeta.targetOption.destructive });
|
|
839
|
-
if (commandArgs[argMeta.idx] instanceof
|
|
847
|
+
if (commandArgs[argMeta.idx] instanceof AppExecutor2)
|
|
840
848
|
process.env.AKAN_PUBLIC_APP_NAME = commandArgs[argMeta.idx].name;
|
|
841
849
|
else if (Array.isArray(commandArgs[argMeta.idx])) {
|
|
842
850
|
const apps = commandArgs[argMeta.idx];
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
extractBlockVersion,
|
|
4
|
-
readDevkitVersion,
|
|
5
3
|
rootAllowedFiles,
|
|
6
4
|
rootAllowedDirs,
|
|
7
5
|
barrelFacetDirs,
|
|
8
6
|
facetIndexShadowOf,
|
|
9
7
|
rootEntryHintOf,
|
|
10
8
|
isScannedRootEntry,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./index-
|
|
9
|
+
extractBlockVersion,
|
|
10
|
+
readDevkitVersion
|
|
11
|
+
} from "./index-crtscw7c.js";
|
|
14
12
|
import {
|
|
15
13
|
FileSys2
|
|
16
14
|
} from "./index-bns3wcpc.js";
|
|
15
|
+
import {
|
|
16
|
+
AppExecutor2
|
|
17
|
+
} from "./index-b3h37zk3.js";
|
|
18
|
+
import {
|
|
19
|
+
LibExecutor2
|
|
20
|
+
} from "./index-1jzdengt.js";
|
|
17
21
|
import {
|
|
18
22
|
collectRecipeSources2,
|
|
19
23
|
scanRecipes2,
|
|
@@ -23,7 +27,7 @@ import {
|
|
|
23
27
|
workflowPathsForPlan,
|
|
24
28
|
workflowRunArtifactPath,
|
|
25
29
|
workflowSyncDir
|
|
26
|
-
} from "./index-
|
|
30
|
+
} from "./index-j2me5hm4.js";
|
|
27
31
|
|
|
28
32
|
// pkgs/@akanjs/devkit/akanContext.ts
|
|
29
33
|
import { readdir } from "fs/promises";
|
|
@@ -352,7 +356,7 @@ var getAppRoutes = async (app, workspaceRoot) => {
|
|
|
352
356
|
}).sort((a, b) => a.path.localeCompare(b.path));
|
|
353
357
|
};
|
|
354
358
|
var getSysContext = async (workspace, type, name, options) => {
|
|
355
|
-
const sys = type === "app" ?
|
|
359
|
+
const sys = type === "app" ? AppExecutor2.from(workspace, name) : LibExecutor2.from(workspace, name);
|
|
356
360
|
const context = {
|
|
357
361
|
type,
|
|
358
362
|
name,
|
|
@@ -363,7 +367,7 @@ var getSysContext = async (workspace, type, name, options) => {
|
|
|
363
367
|
module: options.module
|
|
364
368
|
})
|
|
365
369
|
};
|
|
366
|
-
if (sys instanceof
|
|
370
|
+
if (sys instanceof AppExecutor2 && options.app === name)
|
|
367
371
|
await getAppRoutes(sys, workspace.workspaceRoot).then((routes) => context.routes = routes, (error) => context.routeError = error instanceof Error ? error.message : String(error));
|
|
368
372
|
return context;
|
|
369
373
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
WorkspaceExecutor
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-crtscw7c.js";
|
|
5
5
|
import {
|
|
6
6
|
AkanContextAnalyzer
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-5np8zpep.js";
|
|
8
8
|
import {
|
|
9
9
|
jsonText,
|
|
10
10
|
workflowPlanApproval,
|
|
@@ -30,24 +30,24 @@ import {
|
|
|
30
30
|
renderWorkflowApply,
|
|
31
31
|
renderWorkflowValidation,
|
|
32
32
|
renderWorkflowRunArtifact
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-j2me5hm4.js";
|
|
34
34
|
import {
|
|
35
35
|
CommandContainer,
|
|
36
36
|
runner
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-3gmskeq2.js";
|
|
38
38
|
import {
|
|
39
39
|
ModuleScript
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-2z8mxgs7.js";
|
|
41
41
|
import {
|
|
42
42
|
PrimitiveScript
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-asfx2dhe.js";
|
|
44
44
|
import {
|
|
45
45
|
spawnAkan,
|
|
46
46
|
isWorkspaceTarget
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-1b1p83vq.js";
|
|
48
48
|
import {
|
|
49
49
|
ScalarScript
|
|
50
|
-
} from "./index-
|
|
50
|
+
} from "./index-hbc0t3ng.js";
|
|
51
51
|
import {
|
|
52
52
|
workflowSpecs
|
|
53
53
|
} from "./index-t4d0ckde.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ROOT_LAYOUT_SYSTEM,
|
|
4
4
|
isImplicitRootLayoutKey,
|
|
5
5
|
resolveSsrPageEntriesForApp
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-b3h37zk3.js";
|
|
7
7
|
import {
|
|
8
8
|
computeRouteSeedIndex,
|
|
9
9
|
saveRouteSeedIndex,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
ClientEntriesBundler,
|
|
12
12
|
VENDOR_SPECIFIERS,
|
|
13
13
|
RouteClientBuilder
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-nx4q5rey.js";
|
|
15
15
|
import {
|
|
16
16
|
SOURCE_EXTS,
|
|
17
17
|
FontOptimizer,
|
|
18
18
|
FontPruner
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-66jt3m30.js";
|
|
20
20
|
import {
|
|
21
21
|
BarrelAnalyzer,
|
|
22
22
|
createTsconfigPackageResolver,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
CsrEntryFiles,
|
|
25
25
|
toClientReferencePath,
|
|
26
26
|
PagesBundleBuilder
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-xb1yh9km.js";
|
|
28
28
|
import {
|
|
29
29
|
CssBlockParser
|
|
30
30
|
} from "./index-62md4dwy.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
SubagentPool2,
|
|
20
20
|
McpSignIn,
|
|
21
21
|
AkanCodeCompaction2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-hpe12v1h.js";
|
|
23
23
|
import {
|
|
24
24
|
codeAgentIsLoopback,
|
|
25
25
|
codeAgentHostListed,
|
|
@@ -659,7 +659,7 @@ class AkanToolPack2 {
|
|
|
659
659
|
return { name: "akan-tools", factory: async (pi) => await this.#register(pi) };
|
|
660
660
|
}
|
|
661
661
|
async names() {
|
|
662
|
-
const { ContextRunner } = await import("./context.runner-
|
|
662
|
+
const { ContextRunner } = await import("./context.runner-eawk1n8e.js");
|
|
663
663
|
return [
|
|
664
664
|
...new ContextRunner().listMcpTools(this.#options.mode).map((tool) => tool.name),
|
|
665
665
|
AkanToolPack2.verifyToolName
|
|
@@ -667,7 +667,7 @@ class AkanToolPack2 {
|
|
|
667
667
|
}
|
|
668
668
|
static verifyToolName = "akan_verify";
|
|
669
669
|
async#register(pi) {
|
|
670
|
-
const { ContextRunner } = await import("./context.runner-
|
|
670
|
+
const { ContextRunner } = await import("./context.runner-eawk1n8e.js");
|
|
671
671
|
const runner = new ContextRunner;
|
|
672
672
|
const guidelineNames = await AkanToolPack2.#guidelineNames();
|
|
673
673
|
for (const tool of runner.listMcpTools(this.#options.mode, { guidelineNames })) {
|