@akanjs/cli 3.3.0-rc.1 → 3.3.0-rc.11
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-cqbf9gsv.js +11 -0
- package/{CodeAgentRpcHost-6dzfkvsc.js → CodeAgentRpcHost-pwps2d67.js} +1 -1
- package/{CodeTui-zee8atsr.js → CodeTui-ehdr4hgw.js} +46 -6
- package/TunnelShare-0p4dy89e.js +16 -0
- package/{agent.command-x65f2ags.js → agent.command-x55ncdjm.js} +20 -22
- package/akanCode.js +7 -7
- package/appExecutor-1ctzymwa.js +11 -0
- package/{application.command-azbd1pb2.js → application.command-xpntxnh8.js} +18 -20
- package/{applicationBuildRunner-trfxv3pd.js → applicationBuildRunner-19c76791.js} +16 -13
- package/buildBatch.proc.js +19 -19
- package/{cloud.command-gapp4634.js → cloud.command-p3ybjes7.js} +19 -24
- package/cloud.script-0dsyd10v.js +30 -0
- package/{code.command-5smx61yf.js → code.command-m6skj1kj.js} +34 -19
- package/{context.command-ym5jbkny.js → context.command-3c3nv0d6.js} +20 -22
- package/context.runner-yyp7a112.js +32 -0
- package/csrArtifactBuilder-mdh9ykn2.js +9 -0
- package/{index-2ny1e95c.js → dependencyScanner-93g8tk0r.js} +6 -5
- package/{fileSys-q22646yc.js → fileSys-e5mwt73x.js} +1 -1
- package/frameworkGraph-aneq2nwy.js +8 -0
- package/{guideline.command-zwypaqsh.js → guideline.command-725fq5p0.js} +8 -8
- package/guidelines/agentRule/agentRule.instruction.md +46 -7
- package/guidelines/akanApi/akanApi.instruction.md +7 -2
- package/guidelines/conventions/core.md +6 -11
- package/guidelines/conventions/rules/app.md +1 -2
- package/guidelines/conventions/rules/auth.md +18 -27
- package/guidelines/conventions/rules/config.md +15 -46
- package/guidelines/conventions/rules/page.md +19 -34
- package/guidelines/conventions/rules/server.md +1 -4
- package/guidelines/conventions/rules/ssr.md +3 -4
- package/guidelines/conventions/rules/ts.md +2 -1
- package/guidelines/cssRule/cssRule.instruction.md +3 -0
- package/guidelines/errorCodes/errorCodes.instruction.md +4 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +11 -4
- package/guidelines/pageRule/pageRule.instruction.md +6 -53
- package/guidelines/runtimeRule/runtimeRule.instruction.md +68 -4
- package/incrementalBuilder.proc.js +24 -18
- package/{index-nc3br31y.js → index-22bwg8hy.js} +2 -2
- package/{index-9f3reh2y.js → index-2v38x3ad.js} +12 -1
- package/{index-67sd09ag.js → index-3a3vy2xy.js} +8 -8
- package/{index-p7beqww9.js → index-3fmzz9sf.js} +18 -18
- package/{index-9wh04mqy.js → index-3mj5trqc.js} +65 -11
- package/{index-7wf8snar.js → index-3r1crbct.js} +1 -1
- package/{index-41a03gkj.js → index-3zkhg65e.js} +19 -19
- package/{index-2jmvfa62.js → index-4r8dgm4x.js} +3 -3
- package/{index-jek2re5k.js → index-4yvtqcme.js} +8 -8
- package/{index-j0wr4e32.js → index-5ahe641t.js} +9 -9
- package/{index-0dm25wvf.js → index-7ssr7wq4.js} +1 -1
- package/{index-dmcpetwe.js → index-8bta5pnr.js} +98 -23
- package/{index-z92zm3wd.js → index-9a9t77hz.js} +29 -11
- package/{index-3txdtztz.js → index-9gjcbp2g.js} +1 -1
- package/{index-8jtqfye2.js → index-a4gcdffy.js} +488 -53
- package/{index-xwwex8rf.js → index-cbm9gzgx.js} +5 -5
- package/{index-j6jjmn2r.js → index-ckcc9ab3.js} +62 -21
- package/{index-w1zexzpx.js → index-crd99zqs.js} +1 -1
- package/{index-612fdtbk.js → index-f4jydw2x.js} +1 -1
- package/{index-4ss4gkv3.js → index-fagjtk6m.js} +2 -2
- package/{index-ebn9kgea.js → index-fjqapyex.js} +45 -16
- package/{index-h901f24n.js → index-h8w1n11r.js} +5 -5
- package/{index-275a4r3n.js → index-hxg6ctk2.js} +12 -16
- package/{index-78y75t0a.js → index-j2wq064m.js} +6 -7
- package/{index-knpm8sdm.js → index-j3fqs8rc.js} +1 -1
- package/{index-kfvjzk8r.js → index-kbnvyhy4.js} +3 -3
- package/{index-6dzjer7p.js → index-m303nhv6.js} +6 -6
- package/{index-dadwp2aw.js → index-nmdmkjt2.js} +271 -39
- package/{index-2yn3r67f.js → index-nnmw56fz.js} +6 -6
- package/{index-a860mx0m.js → index-pr9nypg7.js} +24 -24
- package/{index-s885g0jj.js → index-pyjkbg8e.js} +3 -3
- package/{index-zmd9xxgd.js → index-q63nbpv7.js} +3 -3
- package/{index-v7ajmsh3.js → index-qecrqpt6.js} +4 -21
- package/{index-gt8phqpt.js → index-rdcgz02t.js} +4 -4
- package/{index-j592zfqc.js → index-rt7q20sj.js} +1 -1
- package/{index-baccvws5.js → index-se7n78fh.js} +1 -1
- package/{index-s4nvxpzm.js → index-sxbsrndq.js} +1 -1
- package/{index-k6vwww45.js → index-t23dgyaf.js} +7 -7
- package/{index-71y6176j.js → index-v16gj2as.js} +86 -66
- package/{index-0s7w2085.js → index-vnk1qwgr.js} +4 -4
- package/{index-z96ks033.js → index-wkwe91sn.js} +169 -51
- package/{index-ybcb9wc8.js → index-wxqp1amd.js} +9 -9
- package/{index-p5zh7pmc.js → index-xv3pvdw4.js} +1 -1
- package/{index-zfnz878d.js → index-yey1envc.js} +1 -1
- package/{index-by2tvsq6.js → index-zyjztrvc.js} +1 -1
- package/index.js +30 -28
- package/{libExecutor-jc6f8hm6.js → libExecutor-n8hpm8s7.js} +3 -3
- package/{library.command-nxvesvhb.js → library.command-8abb26pg.js} +8 -8
- package/{localRegistry.command-xz62e4ng.js → localRegistry.command-sa211m1z.js} +18 -23
- package/{module.command-aaws9byg.js → module.command-z3cwjf0p.js} +10 -10
- package/{package.command-j7hv26p0.js → package.command-akynhtee.js} +9 -12
- package/package.json +3 -2
- package/{page.command-7yffs7n9.js → page.command-3fpdavk9.js} +8 -8
- package/{pipeline.command-7yk0zcng.js → pipeline.command-ca95n8rd.js} +7 -7
- package/{pkgExecutor-arxmvx4t.js → pkgExecutor-a73q41vx.js} +3 -3
- package/{primitive.command-7a1pt715.js → primitive.command-xwe9ggnf.js} +11 -11
- package/{projectTypecheck-f4qhbecd.js → projectTypecheck-7g542ymk.js} +1 -1
- package/{prompter-qyggfhqd.js → prompter-d33wmdpa.js} +2 -2
- package/{quality.command-c6mvrjh1.js → quality.command-7wz7y8z1.js} +9 -9
- package/{repair.command-093adzt9.js → repair.command-dej1qtfq.js} +10 -10
- package/{scalar.command-2ex84spb.js → scalar.command-z9qfxnvm.js} +9 -9
- package/skills/akan-agent/SKILL.md +8 -1
- package/skills/akan-code/SKILL.md +38 -3
- package/skills/akan-page/SKILL.md +18 -13
- package/skills/akan-runtime/SKILL.md +21 -16
- package/skills/akan-service/SKILL.md +2 -2
- package/{subspace.command-4n4n4jpv.js → subspace.command-9wekm4gn.js} +11 -13
- package/templates/localDev/docker-compose.yaml.template +2 -2
- package/{tunnel.command-f7ep1qfa.js → tunnel.command-cxc4h3j8.js} +10 -12
- package/{verify.command-zrkxnvct.js → verify.command-j0w9dr5c.js} +15 -17
- package/{workflow.command-ks16jegk.js → workflow.command-yt4sz04b.js} +15 -15
- package/{workspace.command-ahhfpaag.js → workspace.command-8mp4mcp2.js} +34 -38
- package/CodeAgent-fx6088tv.js +0 -11
- package/TunnelShare-9ry4vh0y.js +0 -18
- package/appExecutor-79azsb2w.js +0 -11
- package/cloud.script-3b401efv.js +0 -35
- package/context.runner-kctbfsde.js +0 -34
- package/dependencyScanner-ge10gb52.js +0 -8
|
@@ -6,23 +6,23 @@ import {
|
|
|
6
6
|
CloudApi,
|
|
7
7
|
CloudUpdates,
|
|
8
8
|
PipelineSecrets
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-pyjkbg8e.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveMobileTargets
|
|
12
12
|
} from "./index-m9jj544v.js";
|
|
13
13
|
import {
|
|
14
14
|
WorkspaceExecutor
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-v16gj2as.js";
|
|
16
16
|
import {
|
|
17
17
|
AppExecutor2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-9a9t77hz.js";
|
|
19
19
|
import {
|
|
20
20
|
NativeApp
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-fjqapyex.js";
|
|
22
22
|
import {
|
|
23
23
|
runner,
|
|
24
24
|
assertPromptable
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-nnmw56fz.js";
|
|
26
26
|
import {
|
|
27
27
|
getNpmRegistryUrl,
|
|
28
28
|
getPublishedVersions,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
script,
|
|
5
5
|
WorkspaceVersionCheck,
|
|
6
6
|
markCliErrorPrinted
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-nnmw56fz.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
10
|
} from "./index-j4yvgfhr.js";
|
|
@@ -16,39 +16,39 @@ import {
|
|
|
16
16
|
upsertAgentBlock,
|
|
17
17
|
renderRecipeEntries,
|
|
18
18
|
CLAUDE_COMMENT_RULE
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-v16gj2as.js";
|
|
20
20
|
import {
|
|
21
21
|
AppExecutor2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-9a9t77hz.js";
|
|
23
23
|
import {
|
|
24
24
|
LibExecutor2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-yey1envc.js";
|
|
26
26
|
import {
|
|
27
27
|
AkanContextAnalyzer
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-h8w1n11r.js";
|
|
29
29
|
import {
|
|
30
30
|
collectRecipeSources2,
|
|
31
31
|
scanRecipes2
|
|
32
32
|
} from "./index-1p81ecbz.js";
|
|
33
33
|
import {
|
|
34
34
|
akanCodePaths2
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-xv3pvdw4.js";
|
|
36
36
|
import {
|
|
37
37
|
ConventionSet,
|
|
38
38
|
Prompter2
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-j3fqs8rc.js";
|
|
40
40
|
import {
|
|
41
41
|
ApplicationRunner,
|
|
42
42
|
VerifyScope
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-wkwe91sn.js";
|
|
44
44
|
import {
|
|
45
45
|
WorkspaceRunner
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-j2wq064m.js";
|
|
47
47
|
import {
|
|
48
48
|
VerifyComments,
|
|
49
49
|
VerifyPipeline,
|
|
50
50
|
VerifyReport
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-wxqp1amd.js";
|
|
52
52
|
|
|
53
53
|
// pkgs/@akanjs/cli/agent/agent.script.ts
|
|
54
54
|
import { Logger as Logger3 } from "akanjs/common";
|
|
@@ -72,7 +72,15 @@ class AgentAssets {
|
|
|
72
72
|
"akan-scaffold": ["workspaceRecipes"],
|
|
73
73
|
"akan-module": ["moduleOverview", "modelConstant", "modelDictionary", "fieldRule"],
|
|
74
74
|
"akan-scalar": ["scalarModule", "scalarConstant", "scalarDictionary"],
|
|
75
|
-
"akan-service": [
|
|
75
|
+
"akan-service": [
|
|
76
|
+
"modelService",
|
|
77
|
+
"modelSignal",
|
|
78
|
+
"modelDocument",
|
|
79
|
+
"akanApi#imports",
|
|
80
|
+
"akanApi#services-and-adapters",
|
|
81
|
+
"akanApi#endpoints",
|
|
82
|
+
"akanApi#dictionaries"
|
|
83
|
+
],
|
|
76
84
|
"akan-store": ["modelStore"],
|
|
77
85
|
"akan-ui": [
|
|
78
86
|
"ssrRule",
|
|
@@ -89,7 +97,7 @@ class AgentAssets {
|
|
|
89
97
|
"akan-err": ["errorCodes"],
|
|
90
98
|
"akan-deps": [],
|
|
91
99
|
"akan-debug": [],
|
|
92
|
-
"akan-page": ["pageRule", "akanApi"],
|
|
100
|
+
"akan-page": ["pageRule", "akanApi#imports", "akanApi#routes", "akanApi#app-config"],
|
|
93
101
|
"akan-query": ["queryRule"],
|
|
94
102
|
"akan-transport": ["transportRule"],
|
|
95
103
|
"akan-runtime": ["runtimeRule"],
|
|
@@ -142,17 +150,15 @@ ${AgentAssets.marker}
|
|
|
142
150
|
for (const [name, guidelines] of Object.entries(AgentAssets.skillReferences)) {
|
|
143
151
|
const source = await fsPromise.readFile(path.join(dir, name, "SKILL.md"), "utf-8");
|
|
144
152
|
const index = [];
|
|
145
|
-
for (const
|
|
146
|
-
const
|
|
147
|
-
parts.forEach((part, idx) => {
|
|
148
|
-
const file = parts.length === 1 ? `${guideline}.md` : `${guideline}-${idx + 1}.md`;
|
|
153
|
+
for (const reference of guidelines) {
|
|
154
|
+
for (const { file, text, summary } of await AgentAssets.#referenceFiles(reference)) {
|
|
149
155
|
const referencePath = `.agents/skills/${name}/references/${file}`;
|
|
150
156
|
assets.push({ path: referencePath, content: `${AgentAssets.marker}
|
|
151
157
|
|
|
152
|
-
${
|
|
158
|
+
${text.trim()}
|
|
153
159
|
` });
|
|
154
|
-
index.push(`- \`${referencePath}\` \u2014 ${
|
|
155
|
-
}
|
|
160
|
+
index.push(`- \`${referencePath}\` \u2014 ${summary}`);
|
|
161
|
+
}
|
|
156
162
|
}
|
|
157
163
|
const skill = AgentAssets.#skillFile(source, index);
|
|
158
164
|
for (const root of AgentAssets.skillRoots)
|
|
@@ -160,7 +166,39 @@ ${part.text.trim()}
|
|
|
160
166
|
}
|
|
161
167
|
return assets;
|
|
162
168
|
}
|
|
163
|
-
static
|
|
169
|
+
static async#referenceFiles(reference) {
|
|
170
|
+
const [guideline = reference, slug] = reference.split("#");
|
|
171
|
+
const text = await Prompter2.getInstruction(guideline);
|
|
172
|
+
if (slug) {
|
|
173
|
+
const sections = AgentAssets.sections(text);
|
|
174
|
+
const preamble = sections[0]?.headings.length === 0 ? sections[0].text : "";
|
|
175
|
+
const section = sections.find((each) => each.headings[0] && AgentAssets.slug(each.headings[0]) === slug);
|
|
176
|
+
if (!section)
|
|
177
|
+
throw new Error(`Guideline ${guideline} has no section ${slug}`);
|
|
178
|
+
const entries = [...section.text.matchAll(/^### (.+?)(?: \u00B7 .*)?$/gm)].map((match) => match[1]);
|
|
179
|
+
const title = section.headings[0];
|
|
180
|
+
return [
|
|
181
|
+
{
|
|
182
|
+
file: `${guideline}-${slug}.md`,
|
|
183
|
+
text: preamble ? `${preamble.trim()}
|
|
184
|
+
|
|
185
|
+
${section.text.trim()}` : section.text,
|
|
186
|
+
summary: entries.length ? `${title}: ${entries.join(", ")}` : title
|
|
187
|
+
}
|
|
188
|
+
];
|
|
189
|
+
}
|
|
190
|
+
const parts = AgentAssets.split(text);
|
|
191
|
+
return parts.map((part, idx) => ({
|
|
192
|
+
file: parts.length === 1 ? `${guideline}.md` : `${guideline}-${idx + 1}.md`,
|
|
193
|
+
text: part.text,
|
|
194
|
+
summary: AgentAssets.#summarize(part.headings)
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
static slug(heading) {
|
|
198
|
+
const paren = heading.indexOf("(");
|
|
199
|
+
return (paren === -1 ? heading : heading.slice(0, paren).trimEnd()).toLowerCase().replace(/[^a-z0-9]+/g, "-");
|
|
200
|
+
}
|
|
201
|
+
static sections(markdown) {
|
|
164
202
|
const sections = [];
|
|
165
203
|
let fenced = false;
|
|
166
204
|
for (const line of markdown.trim().split(`
|
|
@@ -175,8 +213,11 @@ ${part.text.trim()}
|
|
|
175
213
|
last.text += `
|
|
176
214
|
${line}`;
|
|
177
215
|
}
|
|
216
|
+
return sections;
|
|
217
|
+
}
|
|
218
|
+
static split(markdown) {
|
|
178
219
|
const parts = [];
|
|
179
|
-
for (const section of sections) {
|
|
220
|
+
for (const section of AgentAssets.sections(markdown)) {
|
|
180
221
|
const last = parts.at(-1);
|
|
181
222
|
if (last && last.text.length + section.text.length + 1 <= AgentAssets.referenceLimit) {
|
|
182
223
|
last.text += `
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-nnmw56fz.js";
|
|
6
6
|
import {
|
|
7
7
|
generatedFilesForSync,
|
|
8
8
|
createPassedPrimitiveReport,
|
|
9
9
|
scalarChangedFiles
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-q63nbpv7.js";
|
|
11
11
|
import {
|
|
12
12
|
pluralizeName
|
|
13
13
|
} from "./index-nz8prx9g.js";
|
|
@@ -5,17 +5,14 @@ import {
|
|
|
5
5
|
WorkspaceExecutor,
|
|
6
6
|
ServerEnvProfile,
|
|
7
7
|
AkanAppConfig
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-v16gj2as.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveAppId,
|
|
11
11
|
targetHtmlFilename
|
|
12
12
|
} from "./index-m9jj544v.js";
|
|
13
|
-
import {
|
|
14
|
-
CsrArtifactBuilder
|
|
15
|
-
} from "./index-a860mx0m.js";
|
|
16
13
|
import {
|
|
17
14
|
ExitCodeError
|
|
18
|
-
} from "./index-
|
|
15
|
+
} from "./index-nnmw56fz.js";
|
|
19
16
|
|
|
20
17
|
// pkgs/@akanjs/devkit/mobile/desktopBin.ts
|
|
21
18
|
import { chmod, mkdir, rename, rm, writeFile } from "fs/promises";
|
|
@@ -865,16 +862,7 @@ class NativeConfig {
|
|
|
865
862
|
const native = NativeConfig.#compact({ ios, macos, android, resources });
|
|
866
863
|
const googleServices = target.android?.googleServices;
|
|
867
864
|
const pushAndroid = target.android?.push;
|
|
868
|
-
const desktop = NativeConfig.#
|
|
869
|
-
recovery: target.desktop?.recovery,
|
|
870
|
-
screenCapture: target.desktop?.screenCapture,
|
|
871
|
-
webview2: target.desktop?.webview2,
|
|
872
|
-
publisher: target.desktop?.publisher,
|
|
873
|
-
window: NativeConfig.#compact({ ...target.desktop?.window }),
|
|
874
|
-
server: desktopServer,
|
|
875
|
-
bin: desktopBin,
|
|
876
|
-
dmg: NativeConfig.#dmg(target.desktop?.dmg, abs)
|
|
877
|
-
});
|
|
865
|
+
const desktop = NativeConfig.#desktop(target.desktop, desktopServer, desktopBin, abs);
|
|
878
866
|
const background = target.backgroundColor;
|
|
879
867
|
const shell = NativeConfig.#compact({
|
|
880
868
|
backgroundColor: typeof background === "string" ? background : background?.light,
|
|
@@ -897,7 +885,7 @@ class NativeConfig {
|
|
|
897
885
|
{
|
|
898
886
|
identifier: "app",
|
|
899
887
|
description: `The plugins ${target.appName} ships, each with its default permissions`,
|
|
900
|
-
permissions: pluginIds
|
|
888
|
+
permissions: NativeConfig.#permissions(pluginIds, target, openUrls, warnings)
|
|
901
889
|
}
|
|
902
890
|
],
|
|
903
891
|
...csp ? { security: { csp } } : {},
|
|
@@ -911,6 +899,7 @@ class NativeConfig {
|
|
|
911
899
|
}
|
|
912
900
|
} : {},
|
|
913
901
|
...target.ios?.privacy ? { privacy: target.ios.privacy } : {},
|
|
902
|
+
...target.ios?.hideFormAccessoryBar ? { ios: { hideFormAccessoryBar: true } } : {},
|
|
914
903
|
android: {
|
|
915
904
|
debugAppIdSuffix: ".debug",
|
|
916
905
|
...googleServices ? { googleServices: abs(googleServices) } : {},
|
|
@@ -961,6 +950,32 @@ class NativeConfig {
|
|
|
961
950
|
}
|
|
962
951
|
return policy;
|
|
963
952
|
}
|
|
953
|
+
static #permissions(pluginIds, target, openUrls, warnings) {
|
|
954
|
+
return pluginIds.flatMap((id) => {
|
|
955
|
+
if (id === "opener" && !openUrls.includes("*"))
|
|
956
|
+
return [{ identifier: "opener:default", allow: openUrls.map((url) => ({ url })) }];
|
|
957
|
+
if (id === "external-view")
|
|
958
|
+
return NativeConfig.#externalView(target, warnings);
|
|
959
|
+
return [`${id}:default`];
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
static #externalView({ name, desktop }, warnings) {
|
|
963
|
+
const { allowOrigins = [], evaluate, sendKey } = desktop?.externalView ?? {};
|
|
964
|
+
const origins = allowOrigins.map((origin) => NativeConfig.#exactOrigin(name, origin));
|
|
965
|
+
if (!origins.length)
|
|
966
|
+
warnings.push(`Native target '${name}': external-view opens no origin until native.desktop.externalView.allowOrigins lists one.`);
|
|
967
|
+
return [
|
|
968
|
+
{ identifier: "external-view:default", allow: origins.map((origin) => ({ origin })) },
|
|
969
|
+
...evaluate ? ["external-view:allow-evaluate"] : [],
|
|
970
|
+
...sendKey ? ["external-view:allow-sendKey"] : []
|
|
971
|
+
];
|
|
972
|
+
}
|
|
973
|
+
static #exactOrigin(name, origin) {
|
|
974
|
+
const url = URL.canParse(origin) ? new URL(origin) : null;
|
|
975
|
+
if (!url || !/^https?:$/.test(url.protocol) || url.hostname.includes("*") || url.href !== `${url.origin}/`)
|
|
976
|
+
throw new Error(`Native target '${name}': native.desktop.externalView.allowOrigins holds "${origin}", which is not an exact http(s) origin such as "https://board.example".`);
|
|
977
|
+
return url.origin;
|
|
978
|
+
}
|
|
964
979
|
static #plainOrigins(publicEnv, env, carried) {
|
|
965
980
|
const origins = new Set;
|
|
966
981
|
const pinned = publicEnv.AKAN_PUBLIC_SERVER_URL;
|
|
@@ -982,6 +997,18 @@ class NativeConfig {
|
|
|
982
997
|
return { image: abs(splash) };
|
|
983
998
|
return { ...splash, ...splash.image ? { image: abs(splash.image) } : {} };
|
|
984
999
|
}
|
|
1000
|
+
static #desktop(desktop, server, bin, abs) {
|
|
1001
|
+
return NativeConfig.#compact({
|
|
1002
|
+
recovery: desktop?.recovery,
|
|
1003
|
+
screenCapture: desktop?.screenCapture,
|
|
1004
|
+
webview2: desktop?.webview2,
|
|
1005
|
+
publisher: desktop?.publisher,
|
|
1006
|
+
window: NativeConfig.#compact({ ...desktop?.window }),
|
|
1007
|
+
server,
|
|
1008
|
+
bin,
|
|
1009
|
+
dmg: NativeConfig.#dmg(desktop?.dmg, abs)
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
985
1012
|
static #dmg(dmg, abs) {
|
|
986
1013
|
if (!dmg)
|
|
987
1014
|
return;
|
|
@@ -1126,12 +1153,14 @@ class NativePublicEnv {
|
|
|
1126
1153
|
return [...new Set([...Object.keys(a), ...Object.keys(b)])].filter((key) => a[key] !== b[key]).sort((x, y) => x < y ? -1 : x > y ? 1 : 0);
|
|
1127
1154
|
}
|
|
1128
1155
|
static async built(app) {
|
|
1156
|
+
const { CsrArtifactBuilder } = await import("./csrArtifactBuilder-mdh9ykn2.js");
|
|
1129
1157
|
const file = Bun.file(CsrArtifactBuilder.publicEnvPath(app));
|
|
1130
1158
|
if (!await file.exists())
|
|
1131
1159
|
return null;
|
|
1132
1160
|
return NativePublicEnv.of(await file.json());
|
|
1133
1161
|
}
|
|
1134
1162
|
static async inlined(app) {
|
|
1163
|
+
const { CsrArtifactBuilder } = await import("./csrArtifactBuilder-mdh9ykn2.js");
|
|
1135
1164
|
const file = Bun.file(CsrArtifactBuilder.publicEnvPath(app));
|
|
1136
1165
|
const env = await file.exists() ? await file.json() : process.env;
|
|
1137
1166
|
return Object.fromEntries(Object.entries(env).flatMap(([key, value]) => key.startsWith("AKAN_PUBLIC_") && typeof value === "string" ? [[key, value]] : []));
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
isScannedRootEntry,
|
|
9
9
|
extractBlockVersion,
|
|
10
10
|
readDevkitVersion
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-v16gj2as.js";
|
|
12
12
|
import {
|
|
13
13
|
FileSys2
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-zyjztrvc.js";
|
|
15
15
|
import {
|
|
16
16
|
AppExecutor2
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-9a9t77hz.js";
|
|
18
18
|
import {
|
|
19
19
|
LibExecutor2
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-yey1envc.js";
|
|
21
21
|
import {
|
|
22
22
|
workflowPathsForPlan,
|
|
23
23
|
workflowRunArtifactPath,
|
|
24
24
|
workflowSyncDir
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-q63nbpv7.js";
|
|
26
26
|
import {
|
|
27
27
|
collectRecipeSources2,
|
|
28
28
|
scanRecipes2,
|
|
@@ -2,22 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-nnmw56fz.js";
|
|
6
6
|
import {
|
|
7
7
|
FileSys2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-zyjztrvc.js";
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor2
|
|
11
|
-
} from "./index-
|
|
12
|
-
import {
|
|
13
|
-
FrameworkGraph
|
|
14
|
-
} from "./index-p7beqww9.js";
|
|
11
|
+
} from "./index-crd99zqs.js";
|
|
15
12
|
import {
|
|
16
13
|
MaintainabilityBaseline
|
|
17
|
-
} from "./index-
|
|
18
|
-
import {
|
|
19
|
-
TypeScriptDependencyScanner2
|
|
20
|
-
} from "./index-2ny1e95c.js";
|
|
14
|
+
} from "./index-se7n78fh.js";
|
|
21
15
|
import {
|
|
22
16
|
assertPackageName
|
|
23
17
|
} from "./index-va90m8nd.js";
|
|
@@ -169,9 +163,10 @@ class PackageRunner extends runner("package") {
|
|
|
169
163
|
return await pkg.scan();
|
|
170
164
|
}
|
|
171
165
|
async buildPackage(pkg) {
|
|
166
|
+
const { TypeScriptDependencyScanner } = await import("./dependencyScanner-93g8tk0r.js");
|
|
172
167
|
await $`rm -rf ${pkg.dist.cwdPath}`;
|
|
173
168
|
await pkg.dist.mkdir(pkg.dist.cwdPath);
|
|
174
|
-
const scanner = await
|
|
169
|
+
const scanner = await TypeScriptDependencyScanner.from(pkg);
|
|
175
170
|
const { npmDeps, npmDevDeps, missingDeps } = await scanner.getPackageBuildDependencies(pkg.name);
|
|
176
171
|
const packageRuntimeDependencies = {
|
|
177
172
|
"@akanjs/devkit": [
|
|
@@ -247,7 +242,7 @@ class PackageRunner extends runner("package") {
|
|
|
247
242
|
const relative = scanned.split(path2.sep).join("/");
|
|
248
243
|
if (relative.includes("node_modules/") || relative.endsWith(".d.ts"))
|
|
249
244
|
continue;
|
|
250
|
-
if (/\.(test|spec)\.[a-z]+$/.test(relative))
|
|
245
|
+
if (/\.(test|spec)\.[a-z]+$/.test(relative) || relative.includes("__fixtures__/"))
|
|
251
246
|
continue;
|
|
252
247
|
const source = await Bun.file(`${distPath}/${relative}`).text();
|
|
253
248
|
for (const line of source.split(`
|
|
@@ -286,9 +281,9 @@ class PackageRunner extends runner("package") {
|
|
|
286
281
|
if (!failures.length)
|
|
287
282
|
return;
|
|
288
283
|
throw new Error(`[package] ${pkg.name} dist imports ${failures.length} subpath(s) no consumer can resolve:
|
|
289
|
-
|
|
284
|
+
${failures.sort((a, b) => a < b ? -1 : a > b ? 1 : 0).join(`
|
|
290
285
|
`)}
|
|
291
|
-
|
|
286
|
+
Import a named entry instead, or add one: a file needs "./dir/name": "./dir/name.ts" and a directory facet "./name": "./name/index.ts". A wildcard would publish every file behind it.`);
|
|
292
287
|
}
|
|
293
288
|
async#verifyDistImportsPublished(pkg) {
|
|
294
289
|
const imports = await this.#collectDistAkanImports(pkg.dist.cwdPath, PackageRunner.#unpublishedPackages);
|
|
@@ -300,9 +295,9 @@ class PackageRunner extends runner("package") {
|
|
|
300
295
|
return ` ${specifier} \u2014 imported by ${shown}`;
|
|
301
296
|
});
|
|
302
297
|
throw new Error(`[package] ${pkg.name} dist imports ${failures.length} specifier(s) of a package that is never published:
|
|
303
|
-
|
|
298
|
+
${failures.sort((a, b) => a < b ? -1 : a > b ? 1 : 0).join(`
|
|
304
299
|
`)}
|
|
305
|
-
|
|
300
|
+
Reach it through a published package that embeds it (akanjs/native/api for @akanjs/native/api), or embed it in this package's build.`);
|
|
306
301
|
}
|
|
307
302
|
async verifyDistPackage(pkg, {
|
|
308
303
|
peerExportsMaps = new Map
|
|
@@ -355,6 +350,7 @@ class PackageRunner extends runner("package") {
|
|
|
355
350
|
};
|
|
356
351
|
}
|
|
357
352
|
async syncArchitecture(workspace) {
|
|
353
|
+
const { FrameworkGraph } = await import("./frameworkGraph-aneq2nwy.js");
|
|
358
354
|
const architecture = await FrameworkGraph.architecture(workspace.workspaceRoot);
|
|
359
355
|
if (!architecture)
|
|
360
356
|
throw new Error(`${FrameworkGraph.architectureFile} is only kept in the akanjs repository`);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
camelToKebabCase,
|
|
4
4
|
runner
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-nnmw56fz.js";
|
|
6
6
|
import {
|
|
7
7
|
rootAllowedFiles,
|
|
8
8
|
rootAllowedDirs,
|
|
@@ -16,16 +16,16 @@ import {
|
|
|
16
16
|
renderScopeAgentBlock,
|
|
17
17
|
SysExecutor,
|
|
18
18
|
WorkspaceExecutor
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-v16gj2as.js";
|
|
20
20
|
import {
|
|
21
21
|
FileSys2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-zyjztrvc.js";
|
|
23
23
|
import {
|
|
24
24
|
LibExecutor2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-yey1envc.js";
|
|
26
26
|
import {
|
|
27
27
|
PkgExecutor2
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-crd99zqs.js";
|
|
29
29
|
import {
|
|
30
30
|
collectRecipeSources2,
|
|
31
31
|
scanRecipes2
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
} from "./index-zyb0ebm4.js";
|
|
41
41
|
import {
|
|
42
42
|
MaintainabilityBaseline
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-se7n78fh.js";
|
|
44
44
|
import {
|
|
45
45
|
createFactReader,
|
|
46
46
|
createAst
|
|
@@ -1821,7 +1821,6 @@ var defaultWorkspacePeerDependencies = new Set([
|
|
|
1821
1821
|
"react-dom",
|
|
1822
1822
|
"react-icons",
|
|
1823
1823
|
"react-server-dom-webpack",
|
|
1824
|
-
"tailwindcss",
|
|
1825
1824
|
"typescript"
|
|
1826
1825
|
]);
|
|
1827
1826
|
var defaultWorkspaceTypeDependencies = { "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0" };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
runner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-nnmw56fz.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-q63nbpv7.js";
|
|
12
12
|
import {
|
|
13
13
|
AkanContextAnalyzer
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-h8w1n11r.js";
|
|
15
15
|
import {
|
|
16
16
|
isWorkflowSysName,
|
|
17
17
|
isWorkflowModuleName
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-nnmw56fz.js";
|
|
5
5
|
import {
|
|
6
6
|
AppExecutor2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9a9t77hz.js";
|
|
8
8
|
import {
|
|
9
9
|
LibExecutor2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-yey1envc.js";
|
|
11
11
|
import {
|
|
12
12
|
InteractionScaffold,
|
|
13
13
|
workflowStatus,
|
|
@@ -46,16 +46,16 @@ import {
|
|
|
46
46
|
nextActionsForTarget,
|
|
47
47
|
createPrimitiveWriteReport,
|
|
48
48
|
insertTemplateField
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-q63nbpv7.js";
|
|
50
50
|
import {
|
|
51
51
|
ModuleScript
|
|
52
|
-
} from "./index-
|
|
52
|
+
} from "./index-rdcgz02t.js";
|
|
53
53
|
import {
|
|
54
54
|
plainNameProblem
|
|
55
55
|
} from "./index-va90m8nd.js";
|
|
56
56
|
import {
|
|
57
57
|
ModuleExecutor
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-3r1crbct.js";
|
|
59
59
|
|
|
60
60
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
61
61
|
import { capitalize, lowerlize } from "akanjs/common";
|