@akanjs/cli 3.2.0-rc.17 → 3.2.0-rc.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build-stamp +2 -2
- package/{CodeAgent-18qg03re.js → CodeAgent-q0xkt4at.js} +2 -2
- package/{CodeTui-zkm51zf3.js → CodeTui-n56kpaca.js} +819 -663
- package/TunnelShare-844s9te4.js +18 -0
- package/{agent.command-5k2zegmj.js → agent.command-k07raqft.js} +20 -20
- package/akanCode.js +8 -8
- package/{appExecutor-1bgs9a69.js → appExecutor-xav1zemr.js} +3 -3
- package/{application.command-ge27047n.js → application.command-dv8y8r12.js} +52 -25
- package/{applicationBuildRunner-7skfg8zn.js → applicationBuildRunner-vhx7zq97.js} +9 -10
- package/buildBatch.proc.js +20 -11
- package/{cloud.command-d18qj1v2.js → cloud.command-0vjy3x96.js} +22 -22
- package/cloud.script-jp48r0kw.js +35 -0
- package/{code.command-tz4x5zm6.js → code.command-xc5exq4b.js} +10 -10
- package/{context.command-x1smtm5q.js → context.command-etsat8yk.js} +22 -22
- package/context.runner-e52ak0cx.js +34 -0
- package/{guideline.command-rdcwxf8g.js → guideline.command-zqkntk7b.js} +6 -6
- package/guidelines/agentRule/agentRule.instruction.md +5 -4
- package/guidelines/conventions/core.md +18 -0
- package/guidelines/errorCodes/errorCodes.instruction.md +6 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +4 -2
- package/guidelines/transportRule/transportRule.instruction.md +3 -1
- package/incrementalBuilder.proc.js +559 -409
- package/{index-gh4brxzn.js → index-12js5pj4.js} +1 -1
- package/{index-jfkh776h.js → index-12vv4g80.js} +1 -1
- package/index-4zqebbqb.js +80 -0
- package/{index-er2ja34m.js → index-6bryy19d.js} +500 -422
- package/{index-3641r8q0.js → index-6pzncry1.js} +4 -4
- package/{index-fcrr79gh.js → index-6rrh0ffr.js} +44 -32
- package/{index-nd39rssn.js → index-7jr9mfp2.js} +286 -144
- package/{index-sp331bww.js → index-81qt1jyj.js} +1 -1
- package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
- package/{index-e82xwj3x.js → index-a05ewnnp.js} +1 -1
- package/{index-bjnebzzc.js → index-bxevbjw7.js} +8 -8
- package/{index-vm6pr11y.js → index-c1vym3gx.js} +2 -2
- package/{index-t8tysbxv.js → index-c9hd79py.js} +4 -4
- package/{index-j2eqe3jk.js → index-c9mnfy9r.js} +38 -23
- package/{index-dtpeyts6.js → index-cc9pevta.js} +1 -1
- package/{index-trp7jdr1.js → index-cet2s7xk.js} +7 -6
- package/{index-yr5jv8yd.js → index-dasa0kbj.js} +3 -3
- package/{index-bxqbt5p3.js → index-ddc2zjj5.js} +1 -1
- package/{index-g7e58wz2.js → index-dz7z9n9t.js} +25 -25
- package/{index-z7t6neq1.js → index-e4vna9dn.js} +4 -4
- package/{index-669sg3yp.js → index-ean2tff1.js} +723 -691
- package/{index-ttfz2sc7.js → index-fgp04fh7.js} +6 -6
- package/{index-bzdq8wfw.js → index-g541mhzw.js} +3 -3
- package/{index-t329y8am.js → index-gh741qft.js} +8 -8
- package/{index-d2r762fk.js → index-k51718xz.js} +2136 -2175
- package/{index-39byv35b.js → index-m6r3pvf5.js} +2 -2
- package/{index-emf3wzvh.js → index-my17308p.js} +7 -7
- package/{index-xywq95wk.js → index-nd8bq17n.js} +6 -6
- package/{index-q4e18ne4.js → index-nxcmgqk3.js} +3 -3
- package/{index-b2sptt87.js → index-pkgha3rt.js} +5 -5
- package/{index-s75h0455.js → index-q2t2w996.js} +1 -1
- package/{index-6p02be7n.js → index-qtqhsb33.js} +204 -160
- package/{index-h7yd92c8.js → index-rj2n5kfk.js} +67 -67
- package/{index-1ts8vfsk.js → index-s5gvwvkb.js} +103 -138
- package/{index-neassptx.js → index-sh3yzse2.js} +8 -7
- package/{index-f482h2hj.js → index-syn4vm3y.js} +1 -1
- package/{index-n8mxyy3f.js → index-t00xrkey.js} +1 -1
- package/{index-g56xae1n.js → index-v72mh89f.js} +7 -8
- package/{index-q57rsax4.js → index-wq8pnev4.js} +3 -3
- package/{index-dp7sht3v.js → index-wxr3941g.js} +8 -8
- package/{index-0c8zj1da.js → index-y8mqkhcf.js} +1 -1
- package/{index-9mx3b3zh.js → index-zk1gjk46.js} +4 -4
- package/index.js +27 -27
- package/{libExecutor-hxe5eqfh.js → libExecutor-mr3vxtnr.js} +2 -2
- package/{library.command-83shs8fw.js → library.command-ps9q5t37.js} +7 -7
- package/{localRegistry.command-sz713jg3.js → localRegistry.command-rszxmvd0.js} +21 -21
- package/{module.command-jhhm0nmw.js → module.command-fcybnn1a.js} +10 -10
- package/{package.command-42syy96v.js → package.command-zen3rhye.js} +10 -10
- package/package.json +2 -2
- package/{page.command-jkv29zzs.js → page.command-gwrxymms.js} +7 -7
- package/{pipeline.command-6sg9g4hq.js → pipeline.command-m1brkqqw.js} +6 -6
- package/{pkgExecutor-6p82w5y1.js → pkgExecutor-x51agavp.js} +2 -2
- package/{primitive.command-tt6aq7m9.js → primitive.command-5vkxvvmk.js} +11 -11
- package/{projectTypecheck-wfrz0cxr.js → projectTypecheck-9dzfah37.js} +1 -1
- package/{quality.command-tqar7ss5.js → quality.command-gqry7eas.js} +9 -9
- package/{repair.command-qkcn329t.js → repair.command-qs4ejcrg.js} +10 -10
- package/{routeSourceValidator-8aph1dsr.js → routeSourceValidator-8n6j1vn7.js} +3 -1
- package/{scalar.command-6nvq11ag.js → scalar.command-ny0vchqq.js} +9 -9
- package/skills/akan-scaffold/SKILL.md +1 -1
- package/{subspace.command-dvwds4cv.js → subspace.command-5pxqjgmw.js} +12 -12
- package/templates/biomeForm.ts +1 -1
- package/templates/env/_env.server.type.ts +1 -1
- package/templates/facetIndex/index.ts +2 -37
- package/templates/workspaceRoot/AGENTS.md.template +2 -1
- package/{tunnel.command-h8r69a7v.js → tunnel.command-ndajt0xk.js} +11 -11
- package/{verify.command-ynec8kt2.js → verify.command-m59ashc7.js} +17 -17
- package/{workflow.command-f70fx73a.js → workflow.command-jchqey88.js} +15 -15
- package/{workspace.command-vagjy1q9.js → workspace.command-g0gzxkpd.js} +36 -36
- package/TunnelShare-6t4rwyc0.js +0 -19
- package/cloud.script-0hbhm3mw.js +0 -35
- package/context.runner-vb7jc0k8.js +0 -34
- package/index-dqsc1b5t.js +0 -18
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-sh3yzse2.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-ean2tff1.js";
|
|
8
8
|
import {
|
|
9
9
|
akanMcpInstallTargets
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-6bryy19d.js";
|
|
11
11
|
import {
|
|
12
12
|
ContextRunner2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-qtqhsb33.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/context/context.script.ts
|
|
16
16
|
import { Logger } from "akanjs/common";
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ApplicationBuildReporter
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-s5gvwvkb.js";
|
|
5
5
|
import {
|
|
6
6
|
script,
|
|
7
7
|
markCliErrorPrinted,
|
|
8
8
|
assertPromptable
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-sh3yzse2.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError
|
|
12
12
|
} from "./index-j4yvgfhr.js";
|
|
13
13
|
import {
|
|
14
14
|
SysExecutor
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-v72mh89f.js";
|
|
16
16
|
import {
|
|
17
17
|
AppExecutor2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-cet2s7xk.js";
|
|
19
19
|
import {
|
|
20
20
|
LibExecutor2
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-t00xrkey.js";
|
|
22
22
|
import {
|
|
23
23
|
PkgExecutor2
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-cc9pevta.js";
|
|
25
25
|
import {
|
|
26
26
|
DesktopServerStage
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-12vv4g80.js";
|
|
28
28
|
import {
|
|
29
29
|
LibraryScript
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-nxcmgqk3.js";
|
|
31
31
|
import {
|
|
32
32
|
ApplicationRunner,
|
|
33
33
|
VerifyScope
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-c9mnfy9r.js";
|
|
35
35
|
import {
|
|
36
36
|
PreviewChrome2,
|
|
37
37
|
PreviewView2,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./index-rwgqba9p.js";
|
|
40
40
|
import {
|
|
41
41
|
formatSlicePlan
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-12js5pj4.js";
|
|
43
43
|
import {
|
|
44
44
|
assertPlainName
|
|
45
45
|
} from "./index-va90m8nd.js";
|
|
@@ -633,6 +633,7 @@ class AppPreview {
|
|
|
633
633
|
static mobileViewport = { width: 390, height: 844 };
|
|
634
634
|
static desktopViewport = { width: 1280, height: 800 };
|
|
635
635
|
static csrTarget = "preview";
|
|
636
|
+
static #fullUrl = /^https?:\/\//i;
|
|
636
637
|
static settleMs = 1000;
|
|
637
638
|
static logGraceMs = 300;
|
|
638
639
|
static stopGraceMs = 15000;
|
|
@@ -700,33 +701,31 @@ class AppPreview {
|
|
|
700
701
|
if (options.changed && !changed.paths.length && !typed.length)
|
|
701
702
|
throw new Error(`No page to open: ${changed.skipped.join("; ")}. Pass a concrete path, e.g. \`akan preview ${app.name} /memo/1\`.`);
|
|
702
703
|
const { i18n, api } = await app.getConfig();
|
|
703
|
-
const { paths, asWritten } = AppPreview.#plan(typed, i18n, {
|
|
704
|
+
const { paths, asWritten, folded } = AppPreview.#plan(typed, i18n, {
|
|
704
705
|
csr: !!options.csr,
|
|
705
706
|
apiPrefix: api.prefix,
|
|
706
707
|
publicDir: path2.join(app.cwdPath, "public"),
|
|
707
708
|
pages: changed.paths
|
|
708
709
|
});
|
|
709
710
|
const dev = new URL(origin);
|
|
710
|
-
const isDevServer = (url) => url.protocol === dev.protocol && url.port === dev.port &&
|
|
711
|
-
const elsewhere = [...new Set(typed)].filter((raw) =>
|
|
712
|
-
const skipsBoot =
|
|
711
|
+
const isDevServer = (url) => url.protocol === dev.protocol && url.port === dev.port && AppPreview.#isDevHost(url.hostname);
|
|
712
|
+
const elsewhere = [...new Set(typed)].filter((raw) => AppPreview.#fullUrl.test(raw) && !isDevServer(new URL(raw)));
|
|
713
|
+
const skipsBoot = asWritten;
|
|
713
714
|
const notes = [
|
|
714
715
|
...elsewhere.length ? [
|
|
715
716
|
`${elsewhere.join(", ")} ${elsewhere.length === 1 ? "names another server: its path opens" : "name other servers: their paths open"} on ${origin}.`
|
|
716
717
|
] : [],
|
|
717
718
|
...options.csr && skipsBoot.length ? [
|
|
718
719
|
`--csr does not apply to ${skipsBoot.join(", ")}: ${skipsBoot.length === 1 ? "it opens" : "they open"} without the CSR boot.`
|
|
719
|
-
] : []
|
|
720
|
+
] : [],
|
|
721
|
+
...folded.map(({ raw, kept }) => `${raw} opens as ${kept}, which writes the same screenshot.`)
|
|
720
722
|
];
|
|
721
723
|
return { paths, notes };
|
|
722
724
|
}
|
|
723
|
-
static pagePaths(paths, i18n, options) {
|
|
724
|
-
return AppPreview.#plan(paths, i18n, options).paths;
|
|
725
|
-
}
|
|
726
725
|
static #plan(paths, i18n, { csr, apiPrefix = "/api", publicDir = null, pages = [] }) {
|
|
727
726
|
const keepsUnprefixed = i18n.localePrefix === "as-needed" && !csr;
|
|
728
727
|
const urlOf = (raw) => {
|
|
729
|
-
const url =
|
|
728
|
+
const url = AppPreview.#fullUrl.test(raw) ? new URL(raw) : AppPreview.probeUrlOf("http://localhost", raw);
|
|
730
729
|
url.pathname = url.pathname.replace(/^\/{2,}/, "/");
|
|
731
730
|
return url;
|
|
732
731
|
};
|
|
@@ -740,21 +739,32 @@ class AppPreview {
|
|
|
740
739
|
}
|
|
741
740
|
return `${url.pathname}${url.search}`;
|
|
742
741
|
};
|
|
743
|
-
const
|
|
744
|
-
const typed = (paths.length || pages.length ? paths : ["/"]).map((raw) => {
|
|
742
|
+
const rows = (paths.length || pages.length ? paths : ["/"]).map((raw) => {
|
|
745
743
|
const url = urlOf(raw);
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
asWritten.push(raw);
|
|
749
|
-
return `${url.pathname}${url.search}`;
|
|
744
|
+
const isPage = !AppPreview.#fullUrl.test(raw) && AppPreview.#isPagePath(url.pathname, i18n, { apiPrefix, publicDir });
|
|
745
|
+
return { raw, path: isPage ? asPage(url) : `${url.pathname}${url.search}`, asWritten: !isPage };
|
|
750
746
|
});
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
747
|
+
for (const page of pages)
|
|
748
|
+
rows.push({ raw: null, path: asPage(urlOf(page)), asWritten: false });
|
|
749
|
+
const byScreenshot = new Map;
|
|
750
|
+
const folded = [];
|
|
751
|
+
for (const row of rows) {
|
|
752
|
+
const name = AppPreview.screenshotName(row.path);
|
|
753
|
+
const kept = byScreenshot.get(name);
|
|
754
|
+
if (!kept)
|
|
755
|
+
byScreenshot.set(name, row);
|
|
756
|
+
else if (row.raw !== null && kept.path !== row.path)
|
|
757
|
+
folded.push({ raw: row.raw, kept: kept.path });
|
|
756
758
|
}
|
|
757
|
-
|
|
759
|
+
const planned = [...byScreenshot.values()];
|
|
760
|
+
return {
|
|
761
|
+
paths: planned.map((row) => row.path),
|
|
762
|
+
asWritten: planned.flatMap((row) => row.asWritten && row.raw !== null ? [row.raw] : []),
|
|
763
|
+
folded
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
static #isDevHost(hostname) {
|
|
767
|
+
return ["localhost", "127.0.0.1", "0.0.0.0"].includes(hostname.replace(/\.$/, ""));
|
|
758
768
|
}
|
|
759
769
|
static probeUrlOf(origin, pagePath) {
|
|
760
770
|
return new URL(`${origin}${pagePath.startsWith("/") ? "" : "/"}${pagePath}`);
|
|
@@ -775,6 +785,8 @@ class AppPreview {
|
|
|
775
785
|
const prefixes = ["/_akan", "/__csr", "/__rsc", "/.well-known", apiPrefix.replace(/\/+$/, "")].filter(Boolean);
|
|
776
786
|
if (prefixes.some((prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`)))
|
|
777
787
|
return false;
|
|
788
|
+
if (pathname.endsWith("/"))
|
|
789
|
+
return true;
|
|
778
790
|
if (AppPreview.#serverFiles.has(pathname))
|
|
779
791
|
return false;
|
|
780
792
|
if (segments.length === 2 && segments[1] === "manifest.webmanifest")
|
|
@@ -1723,7 +1735,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
1723
1735
|
await Promise.all(shares.map(async (share) => await share.close()));
|
|
1724
1736
|
}, "Abandoning the tunnel release; the shares expire on their own.");
|
|
1725
1737
|
await Promise.all(apps.map(async (app) => {
|
|
1726
|
-
const { TunnelShare } = await import("./TunnelShare-
|
|
1738
|
+
const { TunnelShare } = await import("./TunnelShare-844s9te4.js");
|
|
1727
1739
|
const share = await TunnelShare.open(app, { workspace: app.workspace });
|
|
1728
1740
|
shares.push(share);
|
|
1729
1741
|
urls.set(app.name, share.url);
|