@akanjs/cli 3.0.0-alpha.99 → 3.0.0-beta.0
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-byytxs22.js → abstractCompactor-mjh5ppsq.js} +1 -1
- package/{agent.command-v1a4746v.js → agent.command-d2gfxfck.js} +5 -5
- package/{application.command-j05fr5jc.js → application.command-pj2m7584.js} +5 -5
- package/{applicationBuildRunner-s4gsk728.js → applicationBuildRunner-kxwbssgn.js} +2 -2
- package/{applicationReleasePackager-28v9vbzk.js → applicationReleasePackager-4yasxwv9.js} +1 -1
- package/buildBatch.proc.js +2 -2
- package/{capacitorApp-8d6d4zkm.js → capacitorApp-36rbr858.js} +2 -2
- package/{cloud.command-r6wvq2rp.js → cloud.command-jshwdq22.js} +9 -9
- package/{context.command-4vdt1aqq.js → context.command-ez8a0zyz.js} +13 -13
- package/{devTui-tnj2hh4f.js → devTui-40ggmd99.js} +85 -84
- package/{devTuiView-xzed2pd6.js → devTuiView-c08ccbat.js} +1 -1
- package/{guideline.command-p92dq6ts.js → guideline.command-xmqwx8zm.js} +11 -7
- package/guidelines/agentRule/agentRule.instruction.md +92 -28
- package/guidelines/conventions/conventions.instruction.md +97 -39
- package/guidelines/mcpRule/mcpRule.generate.json +11 -1
- package/guidelines/mcpRule/mcpRule.instruction.md +296 -53
- package/guidelines/queryRule/queryRule.instruction.md +17 -9
- package/guidelines/ssrRule/ssrRule.instruction.md +15 -13
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +10 -5
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +68 -3
- package/incrementalBuilder.proc.js +1 -1
- package/{index-gq44bqjt.js → index-259dsnz3.js} +2 -2
- package/{index-b9rkcrx8.js → index-2hq52jq3.js} +9 -7
- package/{index-qsq3q8fy.js → index-2tv3fdx4.js} +21 -10
- package/{index-qkk27bk6.js → index-4edzf1gr.js} +4 -4
- package/{index-yza7zkpt.js → index-600zhnve.js} +10 -10
- package/{index-srdssqj7.js → index-7737gxcp.js} +3 -3
- package/{index-zmjppp25.js → index-8pm30m73.js} +5 -5
- package/{index-p5neav9b.js → index-a64esmtb.js} +54 -9
- package/{index-0amdxycf.js → index-fz5q3gd7.js} +3 -3
- package/{index-fc1bh0a7.js → index-gyd220p2.js} +1 -1
- package/{index-5svjba73.js → index-j9yhg404.js} +1 -1
- package/{index-c69j78kk.js → index-kn1h7p1x.js} +1 -1
- package/{index-gtmz74tj.js → index-ktb5njgy.js} +2 -2
- package/{index-znynzt5w.js → index-mak3cd28.js} +1 -1
- package/{index-29sxqfaw.js → index-ne2qy0nk.js} +3 -3
- package/{index-hyywke0f.js → index-pnqbkf5p.js} +1 -1
- package/{index-8p8p0cf8.js → index-rwg2aa4f.js} +3 -3
- package/{index-5wd728df.js → index-v0qh106m.js} +215 -12
- package/{index-7d6vny25.js → index-ws5e0j51.js} +2 -2
- package/{index-1yxtbmbj.js → index-wt7qrtd4.js} +1 -1
- package/{index-gkkdx9kp.js → index-zry5nz81.js} +6 -6
- package/index.js +19 -19
- package/{library.command-s4fszngs.js → library.command-nbsky672.js} +3 -3
- package/{localRegistry.command-fq2w7cgz.js → localRegistry.command-yeq57wjr.js} +8 -8
- package/{module.command-6n7dwvav.js → module.command-29vqzrh8.js} +6 -6
- package/{package.command-gr82ypnr.js → package.command-axv0abmn.js} +3 -3
- package/package.json +2 -2
- package/{page.command-7gvgb3jb.js → page.command-vs9s3zrh.js} +3 -3
- package/{primitive.command-tk5ckw38.js → primitive.command-cbxmqbtc.js} +7 -7
- package/{quality.command-38v81baf.js → quality.command-gmbs7nws.js} +2 -2
- package/{repair.command-5xbwvsxp.js → repair.command-bqsjptsj.js} +5 -5
- package/{routeSourceValidator-ze6x894c.js → routeSourceValidator-apyqw7wk.js} +90 -17
- package/{scalar.command-0epwcr5k.js → scalar.command-6k1vhe9s.js} +5 -5
- package/{subspace.command-e2t36xb2.js → subspace.command-fwjfcts7.js} +7 -5
- package/templates/app/page/_index.tsx +3 -3
- package/templates/app/page/_layout.tsx +31 -32
- package/templates/appSample/page/task/[taskId]/_index.tsx +22 -27
- package/templates/appSample/page/task/[taskId]/edit.tsx +25 -30
- package/templates/appSample/page/task/_index.tsx +3 -7
- package/templates/appSample/page/task/_layout.tsx +4 -15
- package/templates/appSample/page/task/new.tsx +4 -10
- package/templates/crudPages/[__model__Id]/edit/page.tsx +26 -28
- package/templates/crudPages/[__model__Id]/page.tsx +20 -25
- package/templates/crudPages/new/page.tsx +24 -23
- package/templates/crudPages/page.tsx +25 -24
- package/templates/crudSinglePage/page.tsx +25 -24
- package/templates/lib/sig.ts +4 -0
- package/{workflow.command-kphbr7eh.js → workflow.command-nwpcdc8p.js} +10 -10
- package/{workspace.command-ag5hy887.js → workspace.command-8s050m0h.js} +20 -20
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
65f8fdc9a4ad5e1054cf5bf3782626283fa2a2f9fc4e3079e0619ce0b60a4641
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-mak3cd28.js";
|
|
6
6
|
import"./index-q0y2jq9j.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-2tv3fdx4.js";
|
|
8
8
|
import"./index-6wwzs1bc.js";
|
|
9
9
|
import"./index-by5gpp8x.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
import"./index-gyd220p2.js";
|
|
11
|
+
import"./index-ktb5njgy.js";
|
|
12
12
|
import"./index-h7yw2z9n.js";
|
|
13
13
|
import {
|
|
14
14
|
AgentScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-ne2qy0nk.js";
|
|
16
16
|
|
|
17
17
|
// pkgs/@akanjs/cli/agent/agent.command.ts
|
|
18
18
|
class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
|
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
Exec,
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-mak3cd28.js";
|
|
10
10
|
import"./index-q0y2jq9j.js";
|
|
11
|
-
import"./index-
|
|
11
|
+
import"./index-2tv3fdx4.js";
|
|
12
12
|
import"./index-6wwzs1bc.js";
|
|
13
13
|
import {
|
|
14
14
|
ApplicationScript
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
} from "./index-v0qh106m.js";
|
|
16
|
+
import"./index-259dsnz3.js";
|
|
17
17
|
import"./index-hwkygn9s.js";
|
|
18
18
|
import {
|
|
19
19
|
AbstractDoc
|
|
20
20
|
} from "./index-meh558jy.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-j9yhg404.js";
|
|
22
22
|
import {
|
|
23
23
|
getMobileTargetChoices
|
|
24
24
|
} from "./index-47pj3aee.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
Spinner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-2tv3fdx4.js";
|
|
5
5
|
import {
|
|
6
6
|
AllRoutesBuilder,
|
|
7
7
|
CsrArtifactBuilder,
|
|
8
8
|
FontPruner,
|
|
9
9
|
precompressArtifacts,
|
|
10
10
|
SsrBaseArtifactBuilder
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-a64esmtb.js";
|
|
12
12
|
import"./index-w8kmx1b6.js";
|
|
13
13
|
import"./index-q0y2jq9j.js";
|
|
14
14
|
import"./index-hwkygn9s.js";
|
package/buildBatch.proc.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
WorkspaceExecutor,
|
|
4
4
|
AppExecutor
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-2tv3fdx4.js";
|
|
6
6
|
import"./index-q0y2jq9j.js";
|
|
7
7
|
import"./index-6wwzs1bc.js";
|
|
8
8
|
import {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
CsrArtifactBuilder,
|
|
12
12
|
FontOptimizer,
|
|
13
13
|
SsrBaseArtifactBuilder
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-a64esmtb.js";
|
|
15
15
|
import"./index-w8kmx1b6.js";
|
|
16
16
|
import"./index-hwkygn9s.js";
|
|
17
17
|
import"./index-n68jx79w.js";
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import"./index-q0y2jq9j.js";
|
|
3
3
|
import {
|
|
4
4
|
GlobalConfig
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-kn1h7p1x.js";
|
|
6
6
|
import {
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-mak3cd28.js";
|
|
10
|
+
import"./index-2tv3fdx4.js";
|
|
11
11
|
import"./index-6wwzs1bc.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
import"./index-v0qh106m.js";
|
|
13
|
+
import"./index-259dsnz3.js";
|
|
14
14
|
import"./index-hwkygn9s.js";
|
|
15
15
|
import"./index-kcxmv48c.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
16
|
+
import"./index-ws5e0j51.js";
|
|
17
|
+
import"./index-2hq52jq3.js";
|
|
18
18
|
import {
|
|
19
19
|
CloudScript
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
20
|
+
} from "./index-zry5nz81.js";
|
|
21
|
+
import"./index-j9yhg404.js";
|
|
22
22
|
|
|
23
23
|
// pkgs/@akanjs/cli/cloud/cloud.command.ts
|
|
24
24
|
var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-mak3cd28.js";
|
|
6
6
|
import"./index-q0y2jq9j.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-2tv3fdx4.js";
|
|
8
8
|
import"./index-6wwzs1bc.js";
|
|
9
9
|
import"./index-by5gpp8x.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
import"./index-gyd220p2.js";
|
|
11
|
+
import"./index-ktb5njgy.js";
|
|
12
12
|
import {
|
|
13
13
|
ContextScript
|
|
14
|
-
} from "./index-
|
|
15
|
-
import"./index-
|
|
14
|
+
} from "./index-600zhnve.js";
|
|
15
|
+
import"./index-wt7qrtd4.js";
|
|
16
16
|
import"./index-h7yw2z9n.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
17
|
+
import"./index-fz5q3gd7.js";
|
|
18
|
+
import"./index-7737gxcp.js";
|
|
19
|
+
import"./index-kn1h7p1x.js";
|
|
20
|
+
import"./index-8pm30m73.js";
|
|
21
|
+
import"./index-pnqbkf5p.js";
|
|
22
|
+
import"./index-4edzf1gr.js";
|
|
23
|
+
import"./index-rwg2aa4f.js";
|
|
24
24
|
|
|
25
25
|
// pkgs/@akanjs/cli/context/context.command.ts
|
|
26
26
|
class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
openBrowser
|
|
4
|
-
|
|
3
|
+
openBrowser,
|
|
4
|
+
plainTextOf,
|
|
5
|
+
HOST_SOURCE,
|
|
6
|
+
DevLogBuffer
|
|
7
|
+
} from "./index-v0qh106m.js";
|
|
5
8
|
|
|
6
9
|
// pkgs/@akanjs/cli/application/devTui.tsx
|
|
7
10
|
import { render } from "ink";
|
|
8
11
|
|
|
12
|
+
// pkgs/@akanjs/cli/clipboard.ts
|
|
13
|
+
var clipboardCommands = () => {
|
|
14
|
+
if (process.platform === "darwin")
|
|
15
|
+
return [["pbcopy"]];
|
|
16
|
+
if (process.platform === "win32")
|
|
17
|
+
return [["clip"]];
|
|
18
|
+
return [["wl-copy"], ["xclip", "-selection", "clipboard"], ["xsel", "--clipboard", "--input"]];
|
|
19
|
+
};
|
|
20
|
+
var writeClipboard = async (text) => {
|
|
21
|
+
for (const command of clipboardCommands()) {
|
|
22
|
+
try {
|
|
23
|
+
const proc = Bun.spawn(command, {
|
|
24
|
+
stdin: new TextEncoder().encode(text),
|
|
25
|
+
stdout: "ignore",
|
|
26
|
+
stderr: "ignore"
|
|
27
|
+
});
|
|
28
|
+
if (await proc.exited === 0)
|
|
29
|
+
return true;
|
|
30
|
+
} catch {}
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
};
|
|
34
|
+
|
|
9
35
|
// pkgs/@akanjs/cli/ui/DevTuiApp.tsx
|
|
10
36
|
import { Box, Text, useInput } from "ink";
|
|
11
37
|
import { useEffect, useState } from "react";
|
|
@@ -146,6 +172,10 @@ var DevTuiApp = ({ actions }) => {
|
|
|
146
172
|
actions.toggleErrorsOnly();
|
|
147
173
|
else if (input === "c")
|
|
148
174
|
actions.clear();
|
|
175
|
+
else if (input === "y")
|
|
176
|
+
actions.copyLines();
|
|
177
|
+
else if (input === "Y")
|
|
178
|
+
actions.copyPath();
|
|
149
179
|
else if (input === "o")
|
|
150
180
|
actions.openSelected();
|
|
151
181
|
else if (input === "r")
|
|
@@ -199,95 +229,19 @@ var DevTuiApp = ({ actions }) => {
|
|
|
199
229
|
children: " enter to apply \xB7 esc to clear"
|
|
200
230
|
}, undefined, false, undefined, this)
|
|
201
231
|
]
|
|
202
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV(Text, {
|
|
232
|
+
}, undefined, true, undefined, this) : snapshot.notice ? /* @__PURE__ */ jsxDEV(Text, {
|
|
233
|
+
color: "cyan",
|
|
234
|
+
wrap: "truncate",
|
|
235
|
+
children: snapshot.notice
|
|
236
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV(Text, {
|
|
203
237
|
dimColor: true,
|
|
204
238
|
wrap: "truncate",
|
|
205
|
-
children: `Tab next \xB7 1-9 app \xB7 \u2191\u2193 scroll (shift page) \xB7 G follow${snapshot.following ? "" : " (paused)"} \xB7 / grep${snapshot.grep ? ` (${snapshot.grep})` : ""} \xB7 e errors${snapshot.errorsOnly ? " on" : ""} \xB7 c clear \xB7 o open \xB7 r restart \xB7 q quit`
|
|
239
|
+
children: `Tab next \xB7 1-9 app \xB7 \u2191\u2193 scroll (shift page) \xB7 G follow${snapshot.following ? "" : " (paused)"} \xB7 / grep${snapshot.grep ? ` (${snapshot.grep})` : ""} \xB7 e errors${snapshot.errorsOnly ? " on" : ""} \xB7 c clear \xB7 y copy \xB7 Y path \xB7 o open \xB7 r restart \xB7 q quit`
|
|
206
240
|
}, undefined, false, undefined, this)
|
|
207
241
|
]
|
|
208
242
|
}, undefined, true, undefined, this);
|
|
209
243
|
};
|
|
210
244
|
|
|
211
|
-
// pkgs/@akanjs/cli/application/devLogBuffer.ts
|
|
212
|
-
var ansi = new RegExp(`${String.fromCharCode(27)}(?:[@-Z\\\\-_]|\\[[\\s\\S]*?[@-~])`, "g");
|
|
213
|
-
var stripAnsi = (text) => text.replace(ansi, "");
|
|
214
|
-
var HOST_SOURCE = "host";
|
|
215
|
-
var childPrefix = /^\[child:(\d+) ([a-z-]+)\] \[(?:stdout|stderr)\] /;
|
|
216
|
-
var sourceOf = (text) => {
|
|
217
|
-
const match = childPrefix.exec(text);
|
|
218
|
-
return match ? `#${match[1]} ${match[2]}` : HOST_SOURCE;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
class DevLogBuffer {
|
|
222
|
-
static defaultLimit = 5000;
|
|
223
|
-
#limit;
|
|
224
|
-
#lines = [];
|
|
225
|
-
#partial = new Map;
|
|
226
|
-
#sources = new Map;
|
|
227
|
-
#seq = 0;
|
|
228
|
-
constructor({ limit = DevLogBuffer.defaultLimit } = {}) {
|
|
229
|
-
this.#limit = Math.max(1, limit);
|
|
230
|
-
}
|
|
231
|
-
get size() {
|
|
232
|
-
return this.#lines.length;
|
|
233
|
-
}
|
|
234
|
-
sourcesOf(app) {
|
|
235
|
-
return [...this.#sources.get(app) ?? []];
|
|
236
|
-
}
|
|
237
|
-
push(app, kind, chunk) {
|
|
238
|
-
const key = `${app}:${kind}`;
|
|
239
|
-
const parts = `${this.#partial.get(key) ?? ""}${chunk}`.split(`
|
|
240
|
-
`);
|
|
241
|
-
this.#partial.set(key, parts.pop() ?? "");
|
|
242
|
-
return this.#append(app, kind, parts);
|
|
243
|
-
}
|
|
244
|
-
flushPartials() {
|
|
245
|
-
const flushed = [];
|
|
246
|
-
for (const [key, remainder] of [...this.#partial]) {
|
|
247
|
-
this.#partial.set(key, "");
|
|
248
|
-
if (!remainder)
|
|
249
|
-
continue;
|
|
250
|
-
const split = key.lastIndexOf(":");
|
|
251
|
-
const app = key.slice(0, split);
|
|
252
|
-
const kind = key.slice(split + 1) === "stderr" ? "stderr" : "stdout";
|
|
253
|
-
flushed.push(...this.#append(app, kind, [remainder]));
|
|
254
|
-
}
|
|
255
|
-
return flushed;
|
|
256
|
-
}
|
|
257
|
-
select({ app = null, source = null, grep, errorsOnly = false } = {}) {
|
|
258
|
-
const needle = grep?.trim().toLowerCase();
|
|
259
|
-
return this.#lines.filter((line) => {
|
|
260
|
-
if (app !== null && line.app !== app)
|
|
261
|
-
return false;
|
|
262
|
-
if (source !== null && line.source !== source)
|
|
263
|
-
return false;
|
|
264
|
-
if (errorsOnly && line.kind !== "stderr")
|
|
265
|
-
return false;
|
|
266
|
-
if (needle && !stripAnsi(line.text).toLowerCase().includes(needle))
|
|
267
|
-
return false;
|
|
268
|
-
return true;
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
clear(app = null) {
|
|
272
|
-
const kept = app === null ? [] : this.#lines.filter((line) => line.app !== app);
|
|
273
|
-
this.#lines.length = 0;
|
|
274
|
-
this.#lines.push(...kept);
|
|
275
|
-
}
|
|
276
|
-
#append(app, kind, texts) {
|
|
277
|
-
const known = this.#sources.get(app) ?? new Set;
|
|
278
|
-
this.#sources.set(app, known);
|
|
279
|
-
const added = texts.map((text) => {
|
|
280
|
-
const source = sourceOf(text);
|
|
281
|
-
known.add(source);
|
|
282
|
-
return { seq: ++this.#seq, app, source, kind, text };
|
|
283
|
-
});
|
|
284
|
-
this.#lines.push(...added);
|
|
285
|
-
if (this.#lines.length > this.#limit)
|
|
286
|
-
this.#lines.splice(0, this.#lines.length - this.#limit);
|
|
287
|
-
return added;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
245
|
// pkgs/@akanjs/cli/application/devLogWindow.ts
|
|
292
246
|
var windowOf = (lines, rows, anchor) => {
|
|
293
247
|
const height = Math.max(1, Math.trunc(rows));
|
|
@@ -326,6 +280,7 @@ class DevTui {
|
|
|
326
280
|
static frameMs = 34;
|
|
327
281
|
static footerRows = 1;
|
|
328
282
|
static paneChromeRows = 3;
|
|
283
|
+
static noticeMs = 4000;
|
|
329
284
|
#buffer = new DevLogBuffer;
|
|
330
285
|
#listeners = new Set;
|
|
331
286
|
#supervisor;
|
|
@@ -338,6 +293,8 @@ class DevTui {
|
|
|
338
293
|
#errorsOnly = false;
|
|
339
294
|
#frameTimer = null;
|
|
340
295
|
#cachedSnapshot = null;
|
|
296
|
+
#notice = "";
|
|
297
|
+
#noticeTimer = null;
|
|
341
298
|
constructor(supervisor) {
|
|
342
299
|
this.#supervisor = supervisor;
|
|
343
300
|
this.#statuses = supervisor.statuses;
|
|
@@ -354,6 +311,8 @@ class DevTui {
|
|
|
354
311
|
setEditingGrep: this.#setEditingGrep,
|
|
355
312
|
toggleErrorsOnly: this.#toggleErrorsOnly,
|
|
356
313
|
clear: this.#clear,
|
|
314
|
+
copyLines: this.#copyLines,
|
|
315
|
+
copyPath: this.#copyPath,
|
|
357
316
|
openSelected: this.#openSelected,
|
|
358
317
|
restartSelected: this.#restartSelected,
|
|
359
318
|
quit: this.#quit
|
|
@@ -380,6 +339,9 @@ class DevTui {
|
|
|
380
339
|
if (this.#frameTimer)
|
|
381
340
|
clearTimeout(this.#frameTimer);
|
|
382
341
|
this.#frameTimer = null;
|
|
342
|
+
if (this.#noticeTimer)
|
|
343
|
+
clearTimeout(this.#noticeTimer);
|
|
344
|
+
this.#noticeTimer = null;
|
|
383
345
|
process.stdout.off("resize", this.#onResize);
|
|
384
346
|
this.#instance.unmount();
|
|
385
347
|
for (const line of this.#buffer.flushPartials())
|
|
@@ -387,6 +349,10 @@ class DevTui {
|
|
|
387
349
|
`);
|
|
388
350
|
for (const status of this.#statuses)
|
|
389
351
|
process.stdout.write(`${status.name} ${status.url} \u2014 ${status.state}
|
|
352
|
+
`);
|
|
353
|
+
const log = this.#supervisor.sessionLog;
|
|
354
|
+
for (const name of log.appNames)
|
|
355
|
+
process.stdout.write(`${name} log: ${log.relativePathOf(name)}
|
|
390
356
|
`);
|
|
391
357
|
};
|
|
392
358
|
#subscribe = (listener) => {
|
|
@@ -452,6 +418,7 @@ class DevTui {
|
|
|
452
418
|
grep: this.#grep,
|
|
453
419
|
errorsOnly: this.#errorsOnly,
|
|
454
420
|
editingGrep: this.#editingGrep,
|
|
421
|
+
notice: this.#notice,
|
|
455
422
|
readyCount: this.#statuses.filter((candidate) => candidate.state === "ready").length,
|
|
456
423
|
appCount: this.#statuses.length,
|
|
457
424
|
logRows,
|
|
@@ -530,6 +497,40 @@ class DevTui {
|
|
|
530
497
|
this.#anchor = null;
|
|
531
498
|
this.#renderNow();
|
|
532
499
|
};
|
|
500
|
+
#copyLines = () => {
|
|
501
|
+
const lines = this.#filtered(this.#target);
|
|
502
|
+
if (lines.length === 0) {
|
|
503
|
+
this.#setNotice("nothing to copy");
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
const text = plainTextOf(lines, { withApp: this.#target.app === null });
|
|
507
|
+
writeClipboard(text).then((copied) => {
|
|
508
|
+
this.#setNotice(copied ? `copied ${lines.length} lines` : `no clipboard here \u2014 ${this.#logPaths().join(" \xB7 ")}`);
|
|
509
|
+
});
|
|
510
|
+
};
|
|
511
|
+
#copyPath = () => {
|
|
512
|
+
const paths = this.#logPaths();
|
|
513
|
+
writeClipboard(paths.join(`
|
|
514
|
+
`)).then((copied) => {
|
|
515
|
+
this.#setNotice(copied ? `copied ${paths.join(" \xB7 ")}` : paths.join(" \xB7 "));
|
|
516
|
+
});
|
|
517
|
+
};
|
|
518
|
+
#logPaths() {
|
|
519
|
+
const log = this.#supervisor.sessionLog;
|
|
520
|
+
const app = this.#target.app;
|
|
521
|
+
return (app ? [app] : log.appNames).map((name) => log.relativePathOf(name));
|
|
522
|
+
}
|
|
523
|
+
#setNotice(text) {
|
|
524
|
+
this.#notice = text;
|
|
525
|
+
if (this.#noticeTimer)
|
|
526
|
+
clearTimeout(this.#noticeTimer);
|
|
527
|
+
this.#noticeTimer = setTimeout(() => {
|
|
528
|
+
this.#notice = "";
|
|
529
|
+
this.#noticeTimer = null;
|
|
530
|
+
this.#renderNow();
|
|
531
|
+
}, DevTui.noticeMs);
|
|
532
|
+
this.#renderNow();
|
|
533
|
+
}
|
|
533
534
|
#openSelected = () => {
|
|
534
535
|
const status = this.#selectedStatus();
|
|
535
536
|
if (status)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// pkgs/@akanjs/cli/application/devTuiView.ts
|
|
3
3
|
var createDevTuiView = async (supervisor) => {
|
|
4
|
-
const { DevTui } = await import("./devTui-
|
|
4
|
+
const { DevTui } = await import("./devTui-40ggmd99.js");
|
|
5
5
|
return new DevTui(supervisor);
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-mak3cd28.js";
|
|
8
8
|
import {
|
|
9
9
|
FileSys
|
|
10
10
|
} from "./index-q0y2jq9j.js";
|
|
11
|
-
import"./index-
|
|
11
|
+
import"./index-2tv3fdx4.js";
|
|
12
12
|
import {
|
|
13
13
|
getDirname2
|
|
14
14
|
} from "./index-6wwzs1bc.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./index-h7yw2z9n.js";
|
|
18
18
|
import {
|
|
19
19
|
AiSession
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-kn1h7p1x.js";
|
|
21
21
|
|
|
22
22
|
// pkgs/@akanjs/cli/guideline/guideline.script.ts
|
|
23
23
|
import { Logger } from "akanjs/common";
|
|
@@ -135,9 +135,11 @@ Request: ${updateRequest}
|
|
|
135
135
|
async requestCreateDocumentPage(page) {
|
|
136
136
|
const writePath = this.#resolveDocsPagePath(page);
|
|
137
137
|
if (!await this.workspace.exists(writePath))
|
|
138
|
-
await this.workspace.writeFile(writePath, `
|
|
138
|
+
await this.workspace.writeFile(writePath, `import { page } from "akanjs/client";
|
|
139
|
+
|
|
140
|
+
export default page().render(() => {
|
|
139
141
|
return <div>No Content</div>;
|
|
140
|
-
}
|
|
142
|
+
});
|
|
141
143
|
`);
|
|
142
144
|
const instruction = await Prompter.getInstruction(this.name);
|
|
143
145
|
const pageContent = await this.workspace.getLocalFile(writePath);
|
|
@@ -178,9 +180,11 @@ Please return only the file result in the following format for easy parsing.
|
|
|
178
180
|
async requestUpdateDocumentPage(page, updateRequest) {
|
|
179
181
|
const writePath = this.#resolveDocsPagePath(page);
|
|
180
182
|
if (!await this.workspace.exists(writePath))
|
|
181
|
-
await this.workspace.writeFile(writePath, `
|
|
183
|
+
await this.workspace.writeFile(writePath, `import { page } from "akanjs/client";
|
|
184
|
+
|
|
185
|
+
export default page().render(() => {
|
|
182
186
|
return <div>No Content</div>;
|
|
183
|
-
}
|
|
187
|
+
});
|
|
184
188
|
`);
|
|
185
189
|
const instruction = await Prompter.getInstruction(this.name);
|
|
186
190
|
const pageContent = await this.workspace.getLocalFile(writePath);
|