@akanjs/cli 3.1.2-rc.1 → 3.1.2-rc.3
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-dyc45f5w.js → CodeAgent-n2tkg59z.js} +2 -2
- package/{CodeTui-q55b2zrn.js → CodeTui-9wsdx7ap.js} +1 -1
- package/{TunnelShare-hdq9h1hr.js → TunnelShare-6d7z36sr.js} +1 -1
- package/{agent.command-20zaqe60.js → agent.command-tffz6wdn.js} +8 -8
- package/akanCode.js +2 -2
- package/{application.command-nd0fshsk.js → application.command-7bkxbrsp.js} +17 -2
- package/{cloud.command-8kbddsz9.js → cloud.command-a792bc10.js} +3 -3
- package/{cloud.script-hgvvajm3.js → cloud.script-t2n13gv6.js} +3 -3
- package/{code.command-625bg8s8.js → code.command-ma8dtzww.js} +4 -4
- package/commandManifest.json +1 -1
- package/{context.command-p6haqjay.js → context.command-80a1qhps.js} +12 -11
- package/{context.runner-rsnqnk9j.js → context.runner-wxqb3qcy.js} +11 -10
- package/incrementalBuilder.proc.js +22 -2
- package/{index-g841cap9.js → index-361ex3rb.js} +23 -2
- package/{index-raz588b3.js → index-9z3egsmg.js} +8 -7
- package/{index-fhw7yq2d.js → index-aayg4dqf.js} +4 -4
- package/{index-ewbmfarf.js → index-db2nqrad.js} +20 -2
- package/{index-7apsdr5g.js → index-eft5c2mp.js} +1 -1
- package/{index-t1t9wq9a.js → index-gbp1q1b5.js} +1 -1
- package/{index-jc2zbwra.js → index-hapx5myy.js} +1 -1
- package/index-j2dgmzbj.js +1259 -0
- package/{index-j7hwy56s.js → index-j9d3mjx1.js} +1 -1
- package/{index-qw6814m4.js → index-jb2sreps.js} +20 -5
- package/{index-fbewhg4g.js → index-k64mhwbw.js} +60 -1
- package/{index-hm0tn7qv.js → index-m02tdq8a.js} +102 -4
- package/{index-2mwjshz5.js → index-ppvqy5bc.js} +8 -5
- package/{index-tgqameyb.js → index-scck6h6d.js} +3 -3
- package/{index-cjmjvg4r.js → index-sjabnf7j.js} +2 -2
- package/{index-00a7j05x.js → index-sx91nf4z.js} +1 -1
- package/{index-2phm56a1.js → index-tns543wd.js} +2 -2
- package/index-vzpnr12w.js +65 -0
- package/{index-1qsd8ft1.js → index-wrmq92vk.js} +1 -1
- package/{index-a1vb3x7t.js → index-z7kbxdqg.js} +3 -3
- package/{index-t78230d7.js → index-zdpte1pj.js} +2 -1
- package/index.js +16 -16
- package/{localRegistry.command-g3f8k25t.js → localRegistry.command-343ksmn9.js} +2 -2
- package/{module.command-r4sa2khp.js → module.command-2hce9m6k.js} +3 -3
- package/package.json +2 -2
- package/{primitive.command-dfsv4mpe.js → primitive.command-7tdj12wn.js} +4 -4
- package/{quality.command-webzxee2.js → quality.command-29bgarh1.js} +3 -3
- package/{repair.command-3r3j1xre.js → repair.command-yng4rf5d.js} +4 -4
- package/{scalar.command-e8y47j6d.js → scalar.command-1nk4329t.js} +3 -3
- package/skills/akan-scaffold/SKILL.md +1 -0
- package/{subspace.command-a1sf9n5a.js → subspace.command-5cehmcdd.js} +1 -1
- package/{tunnel.command-dcb0wg93.js → tunnel.command-yrd4atqy.js} +1 -1
- package/{verify.command-yyepccbh.js → verify.command-kbq0fcg8.js} +5 -5
- package/{workflow.command-z5pg9ay0.js → workflow.command-274qfa8z.js} +13 -11
- package/{workspace.command-d7x5jttw.js → workspace.command-r6hgmawy.js} +18 -17
- package/index-2nxk8wgs.js +0 -266
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d8513e49255bf8543d57da33449af8ef9a0f8a5ffdca3bc7312299043ea77e58
|
|
@@ -8,24 +8,24 @@ import"./index-g500c5j9.js";
|
|
|
8
8
|
import"./index-35j83zkd.js";
|
|
9
9
|
import"./index-j6eeh5d7.js";
|
|
10
10
|
import"./index-hj6w4ka1.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
11
|
+
import"./index-m02tdq8a.js";
|
|
12
|
+
import"./index-j2dgmzbj.js";
|
|
13
|
+
import"./index-j9d3mjx1.js";
|
|
14
|
+
import"./index-ppvqy5bc.js";
|
|
15
15
|
import"./index-p6x5b7hr.js";
|
|
16
16
|
import"./index-sp0qsr7a.js";
|
|
17
17
|
import"./index-0j1t1h2b.js";
|
|
18
18
|
import"./index-m9jj544v.js";
|
|
19
19
|
import"./index-zbrwnmf1.js";
|
|
20
20
|
import"./index-sveq36gh.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-sjabnf7j.js";
|
|
22
22
|
import"./index-62md4dwy.js";
|
|
23
23
|
import"./index-4am4dvmf.js";
|
|
24
|
-
import"./index-
|
|
24
|
+
import"./index-k64mhwbw.js";
|
|
25
25
|
import {
|
|
26
26
|
AgentScript
|
|
27
|
-
} from "./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
} from "./index-aayg4dqf.js";
|
|
28
|
+
import"./index-eft5c2mp.js";
|
|
29
29
|
import"./index-defp4gmb.js";
|
|
30
30
|
|
|
31
31
|
// pkgs/@akanjs/cli/agent/agent.command.ts
|
package/akanCode.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
CodeMailbox2,
|
|
31
31
|
CodeSessionFork2,
|
|
32
32
|
CodeAgent2
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-z7kbxdqg.js";
|
|
34
34
|
import {
|
|
35
35
|
akanCodeDefaultModel2,
|
|
36
36
|
akanCodeModel2,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
SubagentPool2,
|
|
43
43
|
AkanCodeCompaction2
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-wrmq92vk.js";
|
|
45
45
|
import {
|
|
46
46
|
PreviewChrome2,
|
|
47
47
|
PreviewView2
|
|
@@ -17,10 +17,10 @@ import"./index-m9jj544v.js";
|
|
|
17
17
|
import"./index-zbrwnmf1.js";
|
|
18
18
|
import"./index-sveq36gh.js";
|
|
19
19
|
import"./index-y4kcmbt2.js";
|
|
20
|
-
import"./index-
|
|
20
|
+
import"./index-ppvqy5bc.js";
|
|
21
21
|
import {
|
|
22
22
|
ApplicationScript
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-db2nqrad.js";
|
|
24
24
|
import"./index-tenw3mah.js";
|
|
25
25
|
import {
|
|
26
26
|
writeOption,
|
|
@@ -121,6 +121,21 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
121
121
|
format: format === "json" ? "json" : "text"
|
|
122
122
|
});
|
|
123
123
|
}),
|
|
124
|
+
studio: target({
|
|
125
|
+
desc: "Print the Akan Studio URL of the app's running dev server: its ERD and each module's signals"
|
|
126
|
+
}).with(App).option("module", String, { desc: "the module to show", nullable: true }).option("view", String, { flag: "w", desc: "the view to open", default: "erd", enum: ["erd", "signals"] }).option("editor", String, {
|
|
127
|
+
desc: "the editor source links open in",
|
|
128
|
+
default: "vscode",
|
|
129
|
+
enum: ["vscode", "cursor"]
|
|
130
|
+
}).option("open", Boolean, { desc: "also open it in the browser", default: false }).option("format", String, { desc: "output format", default: "text", enum: ["text", "json"] }).exec(async function(app, module, view, editor, open, format) {
|
|
131
|
+
await this.applicationScript.studio(app, {
|
|
132
|
+
module,
|
|
133
|
+
view: view === "signals" ? "signals" : "erd",
|
|
134
|
+
editor: editor === "cursor" ? "cursor" : "vscode",
|
|
135
|
+
open,
|
|
136
|
+
format: format === "json" ? "json" : "text"
|
|
137
|
+
});
|
|
138
|
+
}),
|
|
124
139
|
console: target({ desc: "Open an interactive server console for the application" }).with(App).exec(async function(app) {
|
|
125
140
|
await this.applicationScript.console(app);
|
|
126
141
|
}),
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
} from "./index-4am4dvmf.js";
|
|
22
22
|
import"./index-p6x5b7hr.js";
|
|
23
23
|
import"./index-y4kcmbt2.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-ppvqy5bc.js";
|
|
25
|
+
import"./index-db2nqrad.js";
|
|
26
26
|
import"./index-tenw3mah.js";
|
|
27
27
|
import"./index-qd7xn2bk.js";
|
|
28
28
|
import"./index-84h43kg6.js";
|
|
29
29
|
import {
|
|
30
30
|
CloudScript2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-sx91nf4z.js";
|
|
32
32
|
import {
|
|
33
33
|
writeOption,
|
|
34
34
|
oneNativeTargetOption,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudScript2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-sx91nf4z.js";
|
|
5
5
|
import"./index-1h2jc0x3.js";
|
|
6
|
-
import"./index-
|
|
6
|
+
import"./index-db2nqrad.js";
|
|
7
7
|
import"./index-y4kcmbt2.js";
|
|
8
8
|
import"./index-84h43kg6.js";
|
|
9
9
|
import"./index-gr9thy79.js";
|
|
10
10
|
import"./index-4am4dvmf.js";
|
|
11
|
-
import"./index-
|
|
11
|
+
import"./index-ppvqy5bc.js";
|
|
12
12
|
import"./index-defp4gmb.js";
|
|
13
13
|
import"./index-0j1t1h2b.js";
|
|
14
14
|
import"./index-sp0qsr7a.js";
|
|
@@ -77,7 +77,7 @@ class CodeRunner extends runner("code") {
|
|
|
77
77
|
async serve(options, listen) {
|
|
78
78
|
await import("./consoleToStderr-h5bryj94.js");
|
|
79
79
|
const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
|
|
80
|
-
import("./CodeAgent-
|
|
80
|
+
import("./CodeAgent-n2tkg59z.js"),
|
|
81
81
|
import("./CodeAgentRpcHost-6dzfkvsc.js"),
|
|
82
82
|
import("./CodeAgentRpcListener-tcwrdvst.js")
|
|
83
83
|
]);
|
|
@@ -111,8 +111,8 @@ class CodeRunner extends runner("code") {
|
|
|
111
111
|
}
|
|
112
112
|
async tui(options, seed) {
|
|
113
113
|
const [{ CodeAgent }, { CodeTui }] = await Promise.all([
|
|
114
|
-
import("./CodeAgent-
|
|
115
|
-
import("./CodeTui-
|
|
114
|
+
import("./CodeAgent-n2tkg59z.js"),
|
|
115
|
+
import("./CodeTui-9wsdx7ap.js")
|
|
116
116
|
]);
|
|
117
117
|
const start = await CodeRunner.#start(options, { hostAttached: false, interactive: true, ask: true });
|
|
118
118
|
const agentOptions = start.agent;
|
|
@@ -148,7 +148,7 @@ class CodeRunner extends runner("code") {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
async run(prompt, options) {
|
|
151
|
-
const { CodeAgent } = await import("./CodeAgent-
|
|
151
|
+
const { CodeAgent } = await import("./CodeAgent-n2tkg59z.js");
|
|
152
152
|
const ask = !!process.stdin.isTTY && !!process.stderr.isTTY;
|
|
153
153
|
const start = await CodeRunner.#start(options, { hostAttached: false, interactive: false, ask });
|
|
154
154
|
for (const warning of start.warnings)
|
package/commandManifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","machine-keygen":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","code":"code","create-application":"application","remove-application":"application","plan-slice":"application","sync":"application","script":"application","migrate":"application","create-migration":"application","preview":"application","console":"application","logs":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","build-desktop":"application","bd":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","start-desktop":"application","sd":"application","release-ios":"application","release-android":"application","pack-update":"application","update-keygen":"application","publish-update":"application","dbup":"application","db-export":"application","db-import":"application","dbdown":"application","create-library":"library","remove-library":"library","sync-library":"library","library-status":"library","install-library":"library","start-registry":"localRegistry","reset-registry":"localRegistry","smoke-registry":"localRegistry","version":"package","create-package":"package","remove-package":"package","sync-package":"package","build-package":"package","verify-dist-package":"package","verify-akan-publish-packages":"package","create-module":"module","remove-module":"module","create-service":"module","create-view":"module","create-unit":"module","create-template":"module","create-crud-page":"page","context":"context","doctor":"context","mcp-install":"context","mcp":"context","mcp-call":"context","login":"cloud","logout":"cloud","deploy-akan":"cloud","test-platforms":"cloud","update":"cloud","push-update":"cloud","register-binary":"cloud","upload-secret":"cloud","list-secrets":"cloud","remove-secret":"cloud","download-env":"cloud","upload-env":"cloud","subspace":"subspace","guideline":"guideline","create-scalar":"scalar","remove-scalar":"scalar","create-ui":"primitive","add-field":"primitive","add-enum-field":"primitive","quality":"quality","verify":"verify","repair":"repair","workflow":"workflow","pipeline":"pipeline","tunnel":"tunnel"}}
|
|
1
|
+
{"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","machine-keygen":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","code":"code","create-application":"application","remove-application":"application","plan-slice":"application","sync":"application","script":"application","migrate":"application","create-migration":"application","preview":"application","studio":"application","console":"application","logs":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","build-desktop":"application","bd":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","start-desktop":"application","sd":"application","release-ios":"application","release-android":"application","pack-update":"application","update-keygen":"application","publish-update":"application","dbup":"application","db-export":"application","db-import":"application","dbdown":"application","create-library":"library","remove-library":"library","sync-library":"library","library-status":"library","install-library":"library","start-registry":"localRegistry","reset-registry":"localRegistry","smoke-registry":"localRegistry","version":"package","create-package":"package","remove-package":"package","sync-package":"package","build-package":"package","verify-dist-package":"package","verify-akan-publish-packages":"package","create-module":"module","remove-module":"module","create-service":"module","create-view":"module","create-unit":"module","create-template":"module","create-crud-page":"page","context":"context","doctor":"context","mcp-install":"context","mcp":"context","mcp-call":"context","login":"cloud","logout":"cloud","deploy-akan":"cloud","test-platforms":"cloud","update":"cloud","push-update":"cloud","register-binary":"cloud","upload-secret":"cloud","list-secrets":"cloud","remove-secret":"cloud","download-env":"cloud","upload-env":"cloud","subspace":"subspace","guideline":"guideline","create-scalar":"scalar","remove-scalar":"scalar","create-ui":"primitive","add-field":"primitive","add-enum-field":"primitive","quality":"quality","verify":"verify","repair":"repair","workflow":"workflow","pipeline":"pipeline","tunnel":"tunnel"}}
|
|
@@ -6,26 +6,27 @@ import {
|
|
|
6
6
|
import"./index-bns3wcpc.js";
|
|
7
7
|
import"./index-g500c5j9.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
9
|
+
import"./index-m02tdq8a.js";
|
|
10
|
+
import"./index-j2dgmzbj.js";
|
|
11
|
+
import"./index-j9d3mjx1.js";
|
|
12
|
+
import"./index-jb2sreps.js";
|
|
13
13
|
import"./index-sp0qsr7a.js";
|
|
14
14
|
import"./index-0j1t1h2b.js";
|
|
15
15
|
import"./index-m9jj544v.js";
|
|
16
16
|
import"./index-zbrwnmf1.js";
|
|
17
17
|
import"./index-sveq36gh.js";
|
|
18
18
|
import"./index-j6eeh5d7.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-vzpnr12w.js";
|
|
20
|
+
import"./index-tns543wd.js";
|
|
20
21
|
import"./index-khk05tsf.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
22
|
+
import"./index-gbp1q1b5.js";
|
|
23
|
+
import"./index-361ex3rb.js";
|
|
24
|
+
import"./index-hapx5myy.js";
|
|
25
|
+
import"./index-k64mhwbw.js";
|
|
26
|
+
import"./index-9z3egsmg.js";
|
|
26
27
|
import {
|
|
27
28
|
ContextScript
|
|
28
|
-
} from "./index-
|
|
29
|
+
} from "./index-scck6h6d.js";
|
|
29
30
|
|
|
30
31
|
// pkgs/@akanjs/cli/context/context.command.ts
|
|
31
32
|
class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ContextRunner2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
4
|
+
} from "./index-jb2sreps.js";
|
|
5
|
+
import"./index-9z3egsmg.js";
|
|
6
|
+
import"./index-hapx5myy.js";
|
|
7
|
+
import"./index-361ex3rb.js";
|
|
8
|
+
import"./index-tns543wd.js";
|
|
9
|
+
import"./index-gbp1q1b5.js";
|
|
10
10
|
import"./index-khk05tsf.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-2nxk8wgs.js";
|
|
11
|
+
import"./index-k64mhwbw.js";
|
|
12
|
+
import"./index-j9d3mjx1.js";
|
|
13
|
+
import"./index-m02tdq8a.js";
|
|
15
14
|
import"./index-0j1t1h2b.js";
|
|
16
15
|
import"./index-j6eeh5d7.js";
|
|
17
16
|
import"./index-sp0qsr7a.js";
|
|
18
17
|
import"./index-m9jj544v.js";
|
|
19
18
|
import"./index-9zy8479y.js";
|
|
19
|
+
import"./index-vzpnr12w.js";
|
|
20
|
+
import"./index-j2dgmzbj.js";
|
|
20
21
|
import"./index-sveq36gh.js";
|
|
21
22
|
import"./index-zbrwnmf1.js";
|
|
22
23
|
import"./index-g500c5j9.js";
|
|
@@ -23,6 +23,10 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
ServerGraphFile
|
|
25
25
|
} from "./index-zbrwnmf1.js";
|
|
26
|
+
import"./index-j2dgmzbj.js";
|
|
27
|
+
import {
|
|
28
|
+
WorkspaceGraph
|
|
29
|
+
} from "./index-vzpnr12w.js";
|
|
26
30
|
import {
|
|
27
31
|
prepareDevWatchBatch
|
|
28
32
|
} from "./index-a5vmm6x4.js";
|
|
@@ -238,6 +242,7 @@ class IncrementalBuilder {
|
|
|
238
242
|
#watcher = null;
|
|
239
243
|
#generation = 0;
|
|
240
244
|
#shellKey = null;
|
|
245
|
+
#graph = null;
|
|
241
246
|
#discoveredThrough = 0;
|
|
242
247
|
#csrActive = IncrementalBuilder.#csrArmedByEnv();
|
|
243
248
|
#csrBundler;
|
|
@@ -918,6 +923,21 @@ class IncrementalBuilder {
|
|
|
918
923
|
});
|
|
919
924
|
this.#logger.verbose(`announced boot state after recycle generation=${generation}`);
|
|
920
925
|
}
|
|
926
|
+
async handleBuildGraph(msg) {
|
|
927
|
+
const generation = this.#generation;
|
|
928
|
+
try {
|
|
929
|
+
if (this.#graph?.generation !== generation) {
|
|
930
|
+
const { workspace } = this.#app;
|
|
931
|
+
const graph = WorkspaceGraph.visibleTo(await WorkspaceGraph.build(workspace), this.#app.name);
|
|
932
|
+
this.#graph = { generation, payload: { workspaceRoot: workspace.workspaceRoot, graph } };
|
|
933
|
+
}
|
|
934
|
+
await BuilderChannel.send({ type: "build-graph-res", id: msg.id, ok: true, data: this.#graph.payload });
|
|
935
|
+
} catch (err) {
|
|
936
|
+
const error = ApplicationBuildReporter.formatError(err, this.#app.workspace.workspaceRoot);
|
|
937
|
+
this.#logger.error(`build-graph failed: ${error}`);
|
|
938
|
+
await BuilderChannel.send({ type: "build-graph-res", id: msg.id, ok: false, error });
|
|
939
|
+
}
|
|
940
|
+
}
|
|
921
941
|
async handleBuildCsr(msg) {
|
|
922
942
|
if (msg.shell) {
|
|
923
943
|
await this.#buildShell(msg);
|
|
@@ -1086,14 +1106,14 @@ class IncrementalBuilder {
|
|
|
1086
1106
|
builder.shutdown(msg.reason);
|
|
1087
1107
|
return;
|
|
1088
1108
|
}
|
|
1089
|
-
if (msg.type !== "build-route" && msg.type !== "build-csr")
|
|
1109
|
+
if (msg.type !== "build-route" && msg.type !== "build-csr" && msg.type !== "build-graph")
|
|
1090
1110
|
return;
|
|
1091
1111
|
if (!builder || builder.shuttingDown) {
|
|
1092
1112
|
const error = builder?.shuttingDown ? recyclingError : bootingError;
|
|
1093
1113
|
BuilderChannel.emit({ type: `${msg.type}-res`, id: msg.id, ok: false, error });
|
|
1094
1114
|
return;
|
|
1095
1115
|
}
|
|
1096
|
-
const handled = msg.type === "build-route" ? builder.handleBuildRoute(msg) : builder.handleBuildCsr(msg);
|
|
1116
|
+
const handled = msg.type === "build-route" ? builder.handleBuildRoute(msg) : msg.type === "build-csr" ? builder.handleBuildCsr(msg) : builder.handleBuildGraph(msg);
|
|
1097
1117
|
handled.catch((err) => logger.error(`${msg.type} failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
1098
1118
|
});
|
|
1099
1119
|
process.on("disconnect", () => {
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
InteractionScaffold,
|
|
12
12
|
workflowStatus,
|
|
13
13
|
compactDiagnostics,
|
|
14
|
+
generatedFilePathsForTarget,
|
|
14
15
|
sourceFile,
|
|
15
16
|
moduleComponentName,
|
|
16
17
|
moduleSourcePaths,
|
|
@@ -42,11 +43,12 @@ import {
|
|
|
42
43
|
hasSignalFactoryEntry,
|
|
43
44
|
insertSignalFactoryEntry,
|
|
44
45
|
addFieldUiPolicyForType,
|
|
46
|
+
KeyRename,
|
|
45
47
|
MutationScaffold
|
|
46
|
-
} from "./index-
|
|
48
|
+
} from "./index-m02tdq8a.js";
|
|
47
49
|
import {
|
|
48
50
|
ModuleScript
|
|
49
|
-
} from "./index-
|
|
51
|
+
} from "./index-gbp1q1b5.js";
|
|
50
52
|
|
|
51
53
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
52
54
|
import { capitalize, lowerlize } from "akanjs/common";
|
|
@@ -323,6 +325,25 @@ class PrimitiveScript extends script("primitive", [ModuleScript]) {
|
|
|
323
325
|
} : null
|
|
324
326
|
});
|
|
325
327
|
}
|
|
328
|
+
async renameKey(workspace, input) {
|
|
329
|
+
const { diagnostics, files } = await KeyRename.build(workspace, input);
|
|
330
|
+
const changedFiles = [];
|
|
331
|
+
if (workflowStatus(diagnostics) === "passed")
|
|
332
|
+
for (const file of files) {
|
|
333
|
+
await workspace.writeFile(file.path, file.content, { silent: true });
|
|
334
|
+
changedFiles.push({ path: file.path, action: file.action, reason: file.reason });
|
|
335
|
+
}
|
|
336
|
+
const targets = KeyRename.targetsOf(changedFiles);
|
|
337
|
+
const names = targets.map((target) => target.slice(target.indexOf("/") + 1));
|
|
338
|
+
return createPrimitiveWriteReport({
|
|
339
|
+
command: "rename-key",
|
|
340
|
+
changedFiles,
|
|
341
|
+
generatedFiles: targets.flatMap((target) => generatedFilePathsForTarget(target, "Generated files may change after sync.")),
|
|
342
|
+
validationCommands: names.flatMap(validationCommandsForTarget),
|
|
343
|
+
diagnostics,
|
|
344
|
+
nextActions: names.flatMap(nextActionsForTarget)
|
|
345
|
+
});
|
|
346
|
+
}
|
|
326
347
|
async#writeServiceSignalEntry(workspace, spec) {
|
|
327
348
|
const sys = await this.resolveSys(workspace, spec.app);
|
|
328
349
|
const diagnostics = compactDiagnostics([
|
|
@@ -26,30 +26,30 @@ import {
|
|
|
26
26
|
renderWorkflowApply,
|
|
27
27
|
renderWorkflowValidation,
|
|
28
28
|
renderWorkflowRunArtifact
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-m02tdq8a.js";
|
|
30
30
|
import {
|
|
31
31
|
AkanContextAnalyzer
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-j9d3mjx1.js";
|
|
33
33
|
import {
|
|
34
34
|
CommandContainer,
|
|
35
35
|
runner
|
|
36
36
|
} from "./index-9zy8479y.js";
|
|
37
37
|
import {
|
|
38
38
|
ModuleScript
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-gbp1q1b5.js";
|
|
40
40
|
import {
|
|
41
41
|
PrimitiveScript
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-361ex3rb.js";
|
|
43
43
|
import {
|
|
44
44
|
spawnAkan,
|
|
45
45
|
isWorkspaceTarget
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-tns543wd.js";
|
|
47
47
|
import {
|
|
48
48
|
ScalarScript
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-hapx5myy.js";
|
|
50
50
|
import {
|
|
51
51
|
workflowSpecs
|
|
52
|
-
} from "./index-
|
|
52
|
+
} from "./index-k64mhwbw.js";
|
|
53
53
|
|
|
54
54
|
// pkgs/@akanjs/cli/workflow/workflow.runner.ts
|
|
55
55
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
@@ -248,6 +248,7 @@ class WorkflowRunner extends runner("workflow") {
|
|
|
248
248
|
addEnumField: (input) => CommandContainer.get(PrimitiveScript).addEnumField(workspace, input),
|
|
249
249
|
addMutation: (input) => CommandContainer.get(PrimitiveScript).addMutation(workspace, input),
|
|
250
250
|
addSlice: (input) => CommandContainer.get(PrimitiveScript).addSlice(workspace, input),
|
|
251
|
+
renameKey: (input) => CommandContainer.get(PrimitiveScript).renameKey(workspace, input),
|
|
251
252
|
createInteraction: (input) => CommandContainer.get(PrimitiveScript).createInteraction(workspace, input)
|
|
252
253
|
});
|
|
253
254
|
}
|
|
@@ -29,19 +29,19 @@ import {
|
|
|
29
29
|
} from "./index-hj6w4ka1.js";
|
|
30
30
|
import {
|
|
31
31
|
AkanContextAnalyzer
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-j9d3mjx1.js";
|
|
33
33
|
import {
|
|
34
34
|
ApplicationRunner,
|
|
35
35
|
VerifyScope
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-ppvqy5bc.js";
|
|
37
37
|
import {
|
|
38
38
|
WorkspaceRunner
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-sjabnf7j.js";
|
|
40
40
|
import {
|
|
41
41
|
VerifyComments,
|
|
42
42
|
VerifyPipeline,
|
|
43
43
|
VerifyReport
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-eft5c2mp.js";
|
|
45
45
|
|
|
46
46
|
// pkgs/@akanjs/cli/agent/agent.script.ts
|
|
47
47
|
import { Logger as Logger3 } from "akanjs/common";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
ApplicationRunner,
|
|
24
24
|
VerifyScope
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-ppvqy5bc.js";
|
|
26
26
|
import {
|
|
27
27
|
PreviewChrome2,
|
|
28
28
|
PreviewView2,
|
|
@@ -1278,6 +1278,24 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
1278
1278
|
markCliErrorPrinted(failure);
|
|
1279
1279
|
throw failure;
|
|
1280
1280
|
}
|
|
1281
|
+
async studio(app, {
|
|
1282
|
+
module,
|
|
1283
|
+
view,
|
|
1284
|
+
editor,
|
|
1285
|
+
open,
|
|
1286
|
+
format
|
|
1287
|
+
}) {
|
|
1288
|
+
const origin = `http://localhost:${await app.getDevPort()}`;
|
|
1289
|
+
if (!await ApplicationRunner.answers(origin, app.name, app.workspace.workspaceRoot))
|
|
1290
|
+
throw new Error(`No dev server answers ${origin}. Run \`akan start ${app.name}\` first.`);
|
|
1291
|
+
const search = new URLSearchParams({ view, editor });
|
|
1292
|
+
if (module)
|
|
1293
|
+
search.set("module", module);
|
|
1294
|
+
const url = `${origin}/_akan/studio?${search.toString()}`;
|
|
1295
|
+
if (open)
|
|
1296
|
+
await openBrowser(url);
|
|
1297
|
+
Logger3.rawLog(format === "json" ? JSON.stringify({ url }) : url);
|
|
1298
|
+
}
|
|
1281
1299
|
async build(app, {
|
|
1282
1300
|
write = true,
|
|
1283
1301
|
fast = false,
|
|
@@ -1577,7 +1595,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
1577
1595
|
await Promise.all(shares.map(async (share) => await share.close()));
|
|
1578
1596
|
}, "Abandoning the tunnel release; the shares expire on their own.");
|
|
1579
1597
|
await Promise.all(apps.map(async (app) => {
|
|
1580
|
-
const { TunnelShare } = await import("./TunnelShare-
|
|
1598
|
+
const { TunnelShare } = await import("./TunnelShare-6d7z36sr.js");
|
|
1581
1599
|
const share = await TunnelShare.open(app, { workspace: app.workspace });
|
|
1582
1600
|
shares.push(share);
|
|
1583
1601
|
urls.set(app.name, share.url);
|