@akanjs/cli 3.0.0-beta.31 → 3.0.0-beta.33
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-tbdpdjat.js → CodeAgent-2vmp9qe0.js} +2 -2
- package/{CodeTui-my2x5fah.js → CodeTui-5ed6bg2a.js} +1 -1
- package/{agent.command-vz60x05c.js → agent.command-gn73rhe7.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-pxqfjrqm.js → application.command-e968t0hw.js} +14 -9
- package/{applicationBuildRunner-shnfyfdy.js → applicationBuildRunner-64taxseg.js} +3 -3
- package/buildBatch.proc.js +3 -3
- package/{cloud.command-9v9tpgps.js → cloud.command-0jm301rr.js} +9 -9
- package/cloud.script-nemnzjpv.js +20 -0
- package/{code.command-13h14j25.js → code.command-18kcm7hq.js} +6 -6
- package/{context.command-x1hbasm5.js → context.command-trd9bn18.js} +13 -13
- package/context.runner-y5hwh673.js +21 -0
- package/{guideline.command-vfk11hpj.js → guideline.command-bdmdn2de.js} +2 -2
- package/guidelines/conventions/conventions.instruction.md +5 -3
- package/guidelines/runtimeRule/runtimeRule.instruction.md +26 -6
- package/incrementalBuilder.proc.js +2 -2
- package/{index-ptshj7y1.js → index-0wpybxtr.js} +3 -3
- package/{index-e52z7psd.js → index-3w94e7n3.js} +18 -2
- package/{index-nhhrjvk1.js → index-4npz05nm.js} +4 -4
- package/{index-9s5zga3q.js → index-6he6gvfg.js} +1 -1
- package/{index-q9q7x4zj.js → index-93j60em0.js} +3 -3
- package/{index-vcdxpmsx.js → index-9z771ptz.js} +2 -2
- package/{index-rqxa9r98.js → index-abxpehf8.js} +7 -7
- package/{index-arnkqb6f.js → index-by9pxkr0.js} +2 -2
- package/{index-947t6zm4.js → index-drehwpdt.js} +2 -2
- package/{index-f50dy7yq.js → index-f3c78nd6.js} +7 -7
- package/{index-f8q701fb.js → index-gbggbqcp.js} +77 -22
- package/{index-7yf7rnjg.js → index-hsmtysz4.js} +2 -2
- package/{index-ksq4t16z.js → index-jmrn54tt.js} +1 -1
- package/{index-ew8dna9s.js → index-kcdj1z5v.js} +2 -2
- package/{index-cxafpw23.js → index-kqabytj7.js} +4 -4
- package/{index-qk9vv9hm.js → index-mbxbhay5.js} +1 -1
- package/{index-zvr7wfyg.js → index-mgxpx3f2.js} +2 -2
- package/{index-zc90rh75.js → index-p993efkq.js} +33 -18
- package/{index-8psse8dw.js → index-pmhqttv3.js} +5 -5
- package/{index-d5yn19ef.js → index-tqm7jjcn.js} +1 -1
- package/{index-1skctzbq.js → index-vpj42xwt.js} +1 -1
- package/{index-smbecayj.js → index-wprnsjms.js} +3 -3
- package/{index-84r80zdx.js → index-y3mphr1m.js} +1 -1
- package/{index-ymnqrsxm.js → index-yg7jhz8x.js} +4 -4
- package/index.js +21 -21
- package/{library.command-m52jqc0s.js → library.command-9h749a1x.js} +3 -3
- package/{localRegistry.command-x5vs1z43.js → localRegistry.command-2bqqhxyz.js} +8 -8
- package/{module.command-ty3k6rwd.js → module.command-nv8nzgft.js} +5 -5
- package/{package.command-hphdh4g4.js → package.command-mq4bggp6.js} +3 -3
- package/package.json +2 -2
- package/{page.command-5aq8mzvq.js → page.command-j639n707.js} +3 -3
- package/{primitive.command-adwj84kx.js → primitive.command-kz6849th.js} +6 -6
- package/{quality.command-y10kea2f.js → quality.command-4hyabwkb.js} +2 -2
- package/{repair.command-v7mwqvjh.js → repair.command-a9awpbqr.js} +5 -5
- package/{scalar.command-pg3gneer.js → scalar.command-ma4fpm9m.js} +4 -4
- package/{subspace.command-ejdmvbq7.js → subspace.command-3k2pmrs4.js} +4 -4
- package/templates/app/page/_index.tsx +257 -258
- package/templates/app/page/_layout.tsx +5 -1
- package/templates/app/page/_overrides.tsx +12 -0
- package/templates/app/page/styles.css.template +316 -14
- package/templates/app/public/apple-touch-icon.png +0 -0
- package/templates/app/public/favicon.ico +0 -0
- package/templates/app/public/jelly/cloud.webp +0 -0
- package/templates/app/public/jelly/comet.webp +0 -0
- package/templates/app/public/jelly/moon.webp +0 -0
- package/templates/app/public/jelly/planet.webp +0 -0
- package/templates/app/public/jelly/rocket.webp +0 -0
- package/templates/app/public/jelly/star.webp +0 -0
- package/templates/app/public/jelly/sugar.webp +0 -0
- package/templates/app/public/logo.png +0 -0
- package/templates/app/ui/Recipe/index.ts +9 -0
- package/templates/app/ui/Recipe/jellyButton.ts +63 -0
- package/templates/appSample/lib/task/Task.Unit.tsx +1 -1
- package/templates/appSample/lib/task/Task.Util.tsx +10 -13
- package/templates/appSample/lib/task/Task.View.tsx +2 -2
- package/templates/appSample/lib/task/Task.Zone.tsx +5 -2
- package/templates/appSample/lib/task/task.signal.spec.ts +4 -15
- package/templates/appSample/lib/task/task.signal.ts +9 -7
- package/templates/appSample/page/task/[taskId]/_index.tsx +6 -6
- package/templates/appSample/page/task/[taskId]/edit.tsx +5 -4
- package/templates/appSample/page/task/_index.tsx +4 -3
- package/templates/appSample/page/task/_layout.tsx +1 -1
- package/templates/appSample/page/task/new.tsx +5 -4
- package/templates/appSample/ui/GlobalLoading.tsx +2 -1
- package/templates/appSample/ui/QuantityControl.tsx +3 -3
- package/templates/workspaceRoot/AGENTS.md.template +6 -0
- package/{tunnel.command-rz9qf230.js → tunnel.command-xwr46b66.js} +2 -2
- package/{workflow.command-6r809r2z.js → workflow.command-t7wqe4h7.js} +10 -10
- package/{workspace.command-8g3cw7jd.js → workspace.command-4derhzrh.js} +24 -21
- package/cloud.script-baqdthnz.js +0 -20
- package/context.runner-kqbjjea1.js +0 -21
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./index-94s080qm.js";
|
|
7
7
|
import {
|
|
8
8
|
runner
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-vpj42xwt.js";
|
|
10
10
|
import {
|
|
11
11
|
WorkspaceExecutor,
|
|
12
12
|
AppExecutor
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-3w94e7n3.js";
|
|
14
14
|
import {
|
|
15
15
|
openBrowser
|
|
16
16
|
} from "./index-9dp031by.js";
|
|
@@ -22,26 +22,26 @@ import {
|
|
|
22
22
|
renderWorkflowApply,
|
|
23
23
|
renderWorkflowValidation,
|
|
24
24
|
renderWorkflowRunArtifact
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-y3mphr1m.js";
|
|
26
26
|
import {
|
|
27
27
|
AkanContextAnalyzer
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-9z771ptz.js";
|
|
29
29
|
import {
|
|
30
30
|
CommandContainer,
|
|
31
31
|
runner
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-vpj42xwt.js";
|
|
33
33
|
import {
|
|
34
34
|
ModuleScript
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-4npz05nm.js";
|
|
36
36
|
import {
|
|
37
37
|
PrimitiveScript
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-kqabytj7.js";
|
|
39
39
|
import {
|
|
40
40
|
spawnShell
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-93j60em0.js";
|
|
42
42
|
import {
|
|
43
43
|
ScalarScript
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-hsmtysz4.js";
|
|
45
45
|
|
|
46
46
|
// pkgs/@akanjs/cli/workflow/workflow.runner.ts
|
|
47
47
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
binPlatforms,
|
|
4
4
|
Executor
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-3w94e7n3.js";
|
|
6
6
|
|
|
7
7
|
// pkgs/@akanjs/devkit/mobile/mobileTarget.ts
|
|
8
8
|
var trimSlashes = (value) => value.replace(/^\/+|\/+$/g, "");
|
|
@@ -92,8 +92,8 @@ class DesktopBin {
|
|
|
92
92
|
this.app = app;
|
|
93
93
|
this.config = config;
|
|
94
94
|
}
|
|
95
|
-
static platform() {
|
|
96
|
-
const platform = `${process.platform}-${
|
|
95
|
+
static platform(arch = process.arch) {
|
|
96
|
+
const platform = `${process.platform}-${arch}`;
|
|
97
97
|
return binPlatforms.includes(platform) ? platform : null;
|
|
98
98
|
}
|
|
99
99
|
static select(config, libs) {
|
|
@@ -135,14 +135,14 @@ class DesktopBin {
|
|
|
135
135
|
get #cacheDir() {
|
|
136
136
|
return path.join(this.app.cwdPath, ".akan", "cache", "bin");
|
|
137
137
|
}
|
|
138
|
-
async stage(dir) {
|
|
138
|
+
async stage(dir, arch = process.arch) {
|
|
139
139
|
const scanInfo = this.app.getScanInfo({ allowEmpty: true }) ?? await this.app.scan({ write: false });
|
|
140
140
|
const chosen = DesktopBin.select(this.config, scanInfo.getLibs());
|
|
141
141
|
if (!chosen.size)
|
|
142
142
|
return [];
|
|
143
|
-
const platform = DesktopBin.platform();
|
|
143
|
+
const platform = DesktopBin.platform(arch);
|
|
144
144
|
if (!platform)
|
|
145
|
-
throw new Error(`bin: this
|
|
145
|
+
throw new Error(`bin: this desktop app is for ${process.platform}-${arch}, and a bin names only ${binPlatforms.join(", ")}.`);
|
|
146
146
|
await rm(dir, { recursive: true, force: true });
|
|
147
147
|
await mkdir(dir, { recursive: true });
|
|
148
148
|
for (const [name, { owner, platforms }] of chosen) {
|
|
@@ -410,7 +410,8 @@ class NativeConfig {
|
|
|
410
410
|
...Object.entries(target.ios?.files ?? {}).map(([to, from]) => ({ from: abs(from), to: `ios/${to}` })),
|
|
411
411
|
...Object.entries(target.android?.files ?? {}).map(([to, from]) => ({ from: abs(from), to: `android/${to}` }))
|
|
412
412
|
];
|
|
413
|
-
const
|
|
413
|
+
const macos = NativeConfig.#compact({ entitlements: target.desktop?.entitlements });
|
|
414
|
+
const native = NativeConfig.#compact({ ios, macos, android, resources });
|
|
414
415
|
const googleServices = target.android?.googleServices;
|
|
415
416
|
const pushAndroid = target.android?.push;
|
|
416
417
|
const desktop = NativeConfig.#compact({
|
|
@@ -642,7 +643,8 @@ class NativeApp {
|
|
|
642
643
|
async config({
|
|
643
644
|
server,
|
|
644
645
|
platform,
|
|
645
|
-
stageBin = true
|
|
646
|
+
stageBin = true,
|
|
647
|
+
arch
|
|
646
648
|
}) {
|
|
647
649
|
const [appConfig, plugins, nativePlugins] = await Promise.all([
|
|
648
650
|
this.app.getConfig(),
|
|
@@ -650,7 +652,7 @@ class NativeApp {
|
|
|
650
652
|
NativePluginFolders.of(this.app)
|
|
651
653
|
]);
|
|
652
654
|
const desktop = platform === "macos" || platform === "windows" || platform === "linux";
|
|
653
|
-
const carried = desktop && stageBin ? await new DesktopBin(this.app, appConfig).stage(this.binDir) : [];
|
|
655
|
+
const carried = desktop && stageBin ? await new DesktopBin(this.app, appConfig).stage(this.binDir, arch) : [];
|
|
654
656
|
return NativeConfig.build({
|
|
655
657
|
appPath: this.app.cwdPath,
|
|
656
658
|
target: this.target.config,
|
|
@@ -664,10 +666,10 @@ class NativeApp {
|
|
|
664
666
|
...carried.length ? { desktopBin: this.binDir } : {}
|
|
665
667
|
});
|
|
666
668
|
}
|
|
667
|
-
async prepare(platform, server) {
|
|
669
|
+
async prepare(platform, server, arch) {
|
|
668
670
|
const [api, { config, warnings }] = await Promise.all([
|
|
669
671
|
NativeApi.load(this.app.cwdPath),
|
|
670
|
-
this.config({ platform, ...server ? { server } : {} })
|
|
672
|
+
this.config({ platform, ...server ? { server } : {}, ...arch ? { arch } : {} })
|
|
671
673
|
]);
|
|
672
674
|
for (const warning of warnings)
|
|
673
675
|
this.app.logger.warn(warning);
|
|
@@ -710,16 +712,28 @@ class NativeApp {
|
|
|
710
712
|
}
|
|
711
713
|
};
|
|
712
714
|
}
|
|
713
|
-
async build(platform, { profile = "release", server, installer = false } = {}) {
|
|
715
|
+
async build(platform, { profile = "release", server, installer = false, arch } = {}) {
|
|
714
716
|
NativeApp.#assertServerPlatform(platform, server);
|
|
715
|
-
|
|
716
|
-
throw new Error(`An installer is built for Windows, not for ${platform}.`);
|
|
717
|
+
NativeApp.assertInstaller(platform, installer);
|
|
717
718
|
await this.assembleWeb(platform);
|
|
718
|
-
const { api, config } = await this.prepare(platform, server);
|
|
719
|
+
const { api, config } = await this.prepare(platform, server, arch);
|
|
719
720
|
return await api.build({
|
|
720
721
|
...this.#task(platform, config),
|
|
721
722
|
profile,
|
|
722
|
-
...
|
|
723
|
+
...arch ? { arch } : {},
|
|
724
|
+
...platform === "windows" ? {
|
|
725
|
+
windows: {
|
|
726
|
+
...installer ? { installer } : {},
|
|
727
|
+
...profile === "release" ? NativeApp.#windowsSigning(api) : {}
|
|
728
|
+
}
|
|
729
|
+
} : {},
|
|
730
|
+
...platform === "macos" ? {
|
|
731
|
+
macos: {
|
|
732
|
+
...profile === "release" ? api.macosDistributionFromEnv(process.env) : {},
|
|
733
|
+
...installer ? { dmg: true } : {}
|
|
734
|
+
}
|
|
735
|
+
} : {},
|
|
736
|
+
...platform === "linux" && installer ? { linux: { appImage: true } } : {}
|
|
723
737
|
});
|
|
724
738
|
}
|
|
725
739
|
async run(platform, { device, teamId, profile = "debug", server } = {}) {
|
|
@@ -795,7 +809,9 @@ class NativeApp {
|
|
|
795
809
|
...this.#task(platform, config),
|
|
796
810
|
platform,
|
|
797
811
|
out: this.updatesDir,
|
|
798
|
-
...channel ? { channel } : {}
|
|
812
|
+
...channel ? { channel } : {},
|
|
813
|
+
...platform === "macos" ? { macos: api.macosDistributionFromEnv(process.env) } : {},
|
|
814
|
+
...platform === "windows" ? { windows: NativeApp.#windowsSigning(api) } : {}
|
|
799
815
|
});
|
|
800
816
|
}
|
|
801
817
|
async assertPublishable(platform, { channel, server = false } = {}) {
|
|
@@ -878,6 +894,14 @@ class NativeApp {
|
|
|
878
894
|
const home = [lang, basePath, indexPath].flatMap((part) => (part ?? "").split("/")).filter((segment) => segment.length > 0);
|
|
879
895
|
return `/${home.join("/")}?${params}`;
|
|
880
896
|
}
|
|
897
|
+
static #windowsSigning(api) {
|
|
898
|
+
const signing = api.windowsSigningFromEnv(process.env);
|
|
899
|
+
return signing ? { signing } : {};
|
|
900
|
+
}
|
|
901
|
+
static assertInstaller(platform, installer) {
|
|
902
|
+
if (installer && (platform === "ios" || platform === "android"))
|
|
903
|
+
throw new Error(`An installer is built for a desktop app (Windows, macOS, Linux), not for ${platform}.`);
|
|
904
|
+
}
|
|
881
905
|
static #assertServerPlatform(platform, server) {
|
|
882
906
|
if (server && (platform === "ios" || platform === "android"))
|
|
883
907
|
throw new Error(`Only a desktop app carries its server; ${platform} cannot run one.`);
|
|
@@ -966,24 +990,55 @@ class DesktopServerStage {
|
|
|
966
990
|
message: `${image}, and a desktop app's server runs none of them: declare in bin the executables its code spawns, or those calls fail on the user's computer.`
|
|
967
991
|
};
|
|
968
992
|
}
|
|
969
|
-
static packageJson(config, built) {
|
|
993
|
+
static packageJson(config, built, omit = []) {
|
|
970
994
|
const otherDrivers = new Set(config.database.modes.filter((mode) => mode !== "single").flatMap((mode) => config.getDatabaseModeRuntimePackages(mode)));
|
|
971
|
-
const dependencies = Object.entries(built.dependencies ?? {}).filter(([name]) => config.externalLibs.includes(name) || name !== DesktopServerStage.rscRenderer && !otherDrivers.has(name));
|
|
995
|
+
const dependencies = Object.entries(built.dependencies ?? {}).filter(([name]) => !omit.includes(name) && (config.externalLibs.includes(name) || name !== DesktopServerStage.rscRenderer && !otherDrivers.has(name)));
|
|
972
996
|
return { ...built, dependencies: Object.fromEntries(dependencies) };
|
|
973
997
|
}
|
|
974
|
-
async
|
|
998
|
+
static async dependentsOf(nodeModules, name) {
|
|
999
|
+
const dependents = new Set;
|
|
1000
|
+
for await (const manifest of new Bun.Glob("**/package.json").scan({ cwd: nodeModules, onlyFiles: true })) {
|
|
1001
|
+
const json = await Bun.file(path7.join(nodeModules, manifest)).json().catch(() => null);
|
|
1002
|
+
if (!json?.name || json.name === name)
|
|
1003
|
+
continue;
|
|
1004
|
+
const declared = { ...json.dependencies, ...json.optionalDependencies, ...json.peerDependencies };
|
|
1005
|
+
if (name in declared)
|
|
1006
|
+
dependents.add(json.name);
|
|
1007
|
+
}
|
|
1008
|
+
return [...dependents].sort();
|
|
1009
|
+
}
|
|
1010
|
+
static installArgs(arch) {
|
|
1011
|
+
return ["install", "--production", "--prefer-offline", ...arch && arch !== process.arch ? [`--cpu=${arch}`] : []];
|
|
1012
|
+
}
|
|
1013
|
+
async install(arch, omit = []) {
|
|
975
1014
|
const config = await this.app.getConfig();
|
|
976
1015
|
DesktopServerStage.assertCarriable(config);
|
|
977
1016
|
await rm3(this.dir, { recursive: true, force: true });
|
|
978
1017
|
await mkdir3(this.dir, { recursive: true });
|
|
979
|
-
|
|
1018
|
+
const built = config.getProductionPackageJson();
|
|
1019
|
+
for (const name of omit.filter((name) => !(name in (built.dependencies ?? {}))))
|
|
1020
|
+
this.app.logger.warn(`desktop.server.omit names ${name}, which the server does not depend on directly.`);
|
|
1021
|
+
await writeFile2(path7.join(this.dir, "package.json"), JSON.stringify(DesktopServerStage.packageJson(config, built, omit), null, 2));
|
|
980
1022
|
try {
|
|
981
|
-
await this.app.spawn(process.execPath,
|
|
1023
|
+
await this.app.spawn(process.execPath, DesktopServerStage.installArgs(arch), { cwd: this.dir });
|
|
982
1024
|
} catch (error) {
|
|
983
1025
|
throw new Error(`The desktop app's server could not install its packages in ${this.dir}: it needs the npm registry, or a Bun cache that already holds every one of them.
|
|
984
1026
|
${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
985
1027
|
}
|
|
986
1028
|
await rm3(path7.join(this.dir, "node_modules", ".bin"), { recursive: true, force: true });
|
|
1029
|
+
await this.#assertOmitted(omit);
|
|
1030
|
+
}
|
|
1031
|
+
async#assertOmitted(omit) {
|
|
1032
|
+
const nodeModules = path7.join(this.dir, "node_modules");
|
|
1033
|
+
const kept = [];
|
|
1034
|
+
for (const name of omit) {
|
|
1035
|
+
if (!await Bun.file(path7.join(nodeModules, name, "package.json")).exists())
|
|
1036
|
+
continue;
|
|
1037
|
+
const dependents = await DesktopServerStage.dependentsOf(nodeModules, name);
|
|
1038
|
+
kept.push(`${name} (needed by ${dependents.join(", ") || "a package that names it"})`);
|
|
1039
|
+
}
|
|
1040
|
+
if (kept.length)
|
|
1041
|
+
throw new Error(`desktop.server.omit leaves out packages another dependency still installs: ${kept.join("; ")}. Omit those too, or keep the package.`);
|
|
987
1042
|
}
|
|
988
1043
|
async prepare(environment) {
|
|
989
1044
|
const config = await this.app.getConfig();
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-vpj42xwt.js";
|
|
6
6
|
import {
|
|
7
7
|
generatedFilesForSync,
|
|
8
8
|
createPassedPrimitiveReport,
|
|
9
9
|
scalarChangedFiles
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-y3mphr1m.js";
|
|
11
11
|
import {
|
|
12
12
|
pluralizeName
|
|
13
13
|
} from "./index-nz8prx9g.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
resolveSsrPageEntriesForApp
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-3w94e7n3.js";
|
|
5
5
|
import {
|
|
6
6
|
computeRouteSeedIndex,
|
|
7
7
|
saveRouteSeedIndex,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
CsrEntryFiles,
|
|
17
17
|
PagesEntrySourceGenerator,
|
|
18
18
|
PagesBundleBuilder
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-6he6gvfg.js";
|
|
20
20
|
import {
|
|
21
21
|
SOURCE_EXTS
|
|
22
22
|
} from "./index-48k96p55.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-vpj42xwt.js";
|
|
5
5
|
import {
|
|
6
6
|
AppExecutor,
|
|
7
7
|
LibExecutor,
|
|
8
8
|
ModuleExecutor
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-3w94e7n3.js";
|
|
10
10
|
import {
|
|
11
11
|
workflowStatus,
|
|
12
12
|
compactDiagnostics,
|
|
@@ -41,10 +41,10 @@ import {
|
|
|
41
41
|
hasSignalFactoryEntry,
|
|
42
42
|
insertSignalFactoryEntry,
|
|
43
43
|
addFieldUiPolicyForType
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-y3mphr1m.js";
|
|
45
45
|
import {
|
|
46
46
|
ModuleScript
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-4npz05nm.js";
|
|
48
48
|
|
|
49
49
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
50
50
|
import { capitalize, lowerlize } from "akanjs/common";
|
|
@@ -37,29 +37,29 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
runner,
|
|
39
39
|
script
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-vpj42xwt.js";
|
|
41
41
|
import {
|
|
42
42
|
WorkspaceExecutor,
|
|
43
43
|
AppExecutor,
|
|
44
44
|
LibExecutor,
|
|
45
45
|
PkgExecutor
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-3w94e7n3.js";
|
|
47
47
|
import {
|
|
48
48
|
DesktopServerStage,
|
|
49
49
|
resolveMobileTargets,
|
|
50
50
|
resolveAppId,
|
|
51
51
|
NativeApp
|
|
52
|
-
} from "./index-
|
|
52
|
+
} from "./index-gbggbqcp.js";
|
|
53
53
|
import {
|
|
54
54
|
LibraryScript
|
|
55
|
-
} from "./index-
|
|
55
|
+
} from "./index-mgxpx3f2.js";
|
|
56
56
|
import {
|
|
57
57
|
stripAnsi
|
|
58
58
|
} from "./index-7md2g9vw.js";
|
|
59
59
|
import {
|
|
60
60
|
SlicePlanner,
|
|
61
61
|
formatSlicePlan
|
|
62
|
-
} from "./index-
|
|
62
|
+
} from "./index-jmrn54tt.js";
|
|
63
63
|
import {
|
|
64
64
|
openBrowser
|
|
65
65
|
} from "./index-9dp031by.js";
|
|
@@ -1867,16 +1867,16 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
|
|
|
1867
1867
|
|
|
1868
1868
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
1869
1869
|
import { Logger as Logger3 } from "akanjs/common";
|
|
1870
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
1870
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-64taxseg.js")).ApplicationBuildRunner;
|
|
1871
1871
|
var loadPrompts = async () => await import("@inquirer/prompts");
|
|
1872
1872
|
|
|
1873
1873
|
class ApplicationRunner extends runner("application") {
|
|
1874
|
-
async createApplication(appName, workspace, libs = []) {
|
|
1874
|
+
async createApplication(appName, workspace, libs = [], { sample = false } = {}) {
|
|
1875
1875
|
await workspace.applyTemplate({
|
|
1876
1876
|
basePath: `apps/${appName}`,
|
|
1877
1877
|
template: "app",
|
|
1878
1878
|
dict: { appName },
|
|
1879
|
-
options: { libs }
|
|
1879
|
+
options: { libs, sample }
|
|
1880
1880
|
});
|
|
1881
1881
|
return AppExecutor.from(workspace, appName);
|
|
1882
1882
|
}
|
|
@@ -2059,16 +2059,20 @@ try {
|
|
|
2059
2059
|
setTimeout(() => openBrowser(`http://localhost:${env.AKAN_PUBLIC_CLIENT_PORT ?? env.PORT ?? "8282"}`), 3000);
|
|
2060
2060
|
return appHost;
|
|
2061
2061
|
}
|
|
2062
|
-
async buildMobile(app, platform, { target, env = "debug", profile = "release", installer = false } = {}) {
|
|
2062
|
+
async buildMobile(app, platform, { target, env = "debug", profile = "release", installer = false, arch } = {}) {
|
|
2063
2063
|
const targets = await resolveMobileTargets(app, target);
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2064
|
+
NativeApp.assertInstaller(platform, installer);
|
|
2065
|
+
if (arch && platform !== "macos" && platform !== "windows" && platform !== "linux")
|
|
2066
|
+
throw new Error(`--arch picks a desktop app's CPU; ${platform} builds for its own.`);
|
|
2067
|
+
if (arch === "x64" && platform === "macos")
|
|
2068
|
+
throw new Error("A macOS app is built for Apple silicon (arm64) only.");
|
|
2069
|
+
const carried = await this.#stageMobile(app, platform, targets, env, arch);
|
|
2067
2070
|
await this.#runMobileTargets(targets, async (mobileTarget) => {
|
|
2068
2071
|
this.#reportBuild(app, mobileTarget, await new NativeApp(app, mobileTarget, env).build(platform, {
|
|
2069
2072
|
profile,
|
|
2070
2073
|
...carried && ApplicationRunner.carriesServer(mobileTarget, platform) ? { server: carried } : {},
|
|
2071
|
-
...installer ? { installer } : {}
|
|
2074
|
+
...installer ? { installer } : {},
|
|
2075
|
+
...arch ? { arch } : {}
|
|
2072
2076
|
}));
|
|
2073
2077
|
});
|
|
2074
2078
|
}
|
|
@@ -2218,11 +2222,22 @@ try {
|
|
|
2218
2222
|
app.log(`${app.name}/${mobileTarget.name} ${artifact.kind}: ${artifact.path}`);
|
|
2219
2223
|
}
|
|
2220
2224
|
static carriesServer({ config }, platform = NativeApp.desktopPlatform()) {
|
|
2221
|
-
return platform !== "ios" && platform !== "android" && config.desktop?.server
|
|
2225
|
+
return platform !== "ios" && platform !== "android" && !!config.desktop?.server;
|
|
2222
2226
|
}
|
|
2223
|
-
|
|
2227
|
+
static serverOmit(targets, platform) {
|
|
2228
|
+
const carrying = targets.filter((target) => ApplicationRunner.carriesServer(target, platform));
|
|
2229
|
+
const omits = carrying.map(({ config }) => {
|
|
2230
|
+
const server = config.desktop?.server;
|
|
2231
|
+
return typeof server === "object" ? server.omit ?? [] : [];
|
|
2232
|
+
});
|
|
2233
|
+
const [first = [], ...rest] = omits;
|
|
2234
|
+
if (rest.some((omit) => omit.join("\x00") !== first.join("\x00")))
|
|
2235
|
+
throw new Error(`The targets that carry the server omit different packages (${carrying.map(({ name }, idx) => `${name}: ${omits[idx]?.join(", ") || "none"}`).join("; ")}); build them one --target at a time.`);
|
|
2236
|
+
return first;
|
|
2237
|
+
}
|
|
2238
|
+
async#stageMobile(app, platform, targets, env, arch) {
|
|
2224
2239
|
const stage = targets.some((mobileTarget) => ApplicationRunner.carriesServer(mobileTarget, platform)) ? new DesktopServerStage(app) : null;
|
|
2225
|
-
await stage?.install();
|
|
2240
|
+
await stage?.install(arch, ApplicationRunner.serverOmit(targets, platform));
|
|
2226
2241
|
await this.#buildMobileCsr(app, env);
|
|
2227
2242
|
return await stage?.prepare(env);
|
|
2228
2243
|
}
|
|
@@ -3160,9 +3175,9 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
3160
3175
|
throw error;
|
|
3161
3176
|
}
|
|
3162
3177
|
}
|
|
3163
|
-
async createApplication(appName, workspace, { start = false, libs = [] } = {}) {
|
|
3178
|
+
async createApplication(appName, workspace, { start = false, libs = [], sample = false } = {}) {
|
|
3164
3179
|
const spinner = workspace.spinning("Creating application...");
|
|
3165
|
-
const app = await this.applicationRunner.createApplication(appName, workspace, libs);
|
|
3180
|
+
const app = await this.applicationRunner.createApplication(appName, workspace, libs, { sample });
|
|
3166
3181
|
spinner.succeed(`Application created in apps/${app.name}`);
|
|
3167
3182
|
await app.scanSync();
|
|
3168
3183
|
if (start)
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
} from "./index-94s080qm.js";
|
|
6
6
|
import {
|
|
7
7
|
script
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-vpj42xwt.js";
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-3w94e7n3.js";
|
|
12
12
|
import {
|
|
13
13
|
ApplicationScript
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-p993efkq.js";
|
|
15
15
|
import {
|
|
16
16
|
PackageScript
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-by9pxkr0.js";
|
|
18
18
|
import {
|
|
19
19
|
CloudRunner
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-drehwpdt.js";
|
|
21
21
|
|
|
22
22
|
// pkgs/@akanjs/cli/cloud/cloud.script.ts
|
|
23
23
|
import { Logger } from "akanjs/common";
|
|
@@ -116,7 +116,7 @@ class SubagentPool2 {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
async#run(id, kind, prompt, signal) {
|
|
119
|
-
const { CodeAgent } = await import("./CodeAgent-
|
|
119
|
+
const { CodeAgent } = await import("./CodeAgent-2vmp9qe0.js");
|
|
120
120
|
const budget = this.#options.parent.tools.subagent;
|
|
121
121
|
const child = SubagentPool2.childOf(this.#options.parent, kind);
|
|
122
122
|
const agent = await CodeAgent.create({
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
LibExecutor,
|
|
11
11
|
PkgExecutor,
|
|
12
12
|
ModuleExecutor
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-3w94e7n3.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
|
|
16
16
|
var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-vpj42xwt.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_BLOCK_START,
|
|
8
8
|
AGENT_BLOCK_END,
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
CLAUDE_COMMENT_RULE,
|
|
14
14
|
AppExecutor,
|
|
15
15
|
LibExecutor
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-3w94e7n3.js";
|
|
17
17
|
import {
|
|
18
18
|
collectRecipeSources2,
|
|
19
19
|
scanRecipes2
|
|
20
20
|
} from "./index-hj6w4ka1.js";
|
|
21
21
|
import {
|
|
22
22
|
AkanContextAnalyzer
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-9z771ptz.js";
|
|
24
24
|
import {
|
|
25
25
|
Prompter2
|
|
26
26
|
} from "./index-zzvvc845.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
jsonText
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-y3mphr1m.js";
|
|
5
5
|
import {
|
|
6
6
|
akanMcpInstallTargets
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9z771ptz.js";
|
|
8
8
|
import {
|
|
9
9
|
script
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-vpj42xwt.js";
|
|
11
11
|
import {
|
|
12
12
|
ContextRunner2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-abxpehf8.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/context/context.script.ts
|
|
16
16
|
import { Logger } from "akanjs/common";
|
package/index.js
CHANGED
|
@@ -4,34 +4,34 @@ import {
|
|
|
4
4
|
getTargetMetas,
|
|
5
5
|
getTargetCommandNames,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-vpj42xwt.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-3w94e7n3.js";
|
|
10
10
|
|
|
11
11
|
// pkgs/@akanjs/cli/commandManifest.ts
|
|
12
12
|
import path from "path";
|
|
13
13
|
|
|
14
14
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
15
15
|
var commandModules = {
|
|
16
|
-
workspace: async () => (await import("./workspace.command-
|
|
17
|
-
agent: async () => (await import("./agent.command-
|
|
18
|
-
code: async () => (await import("./code.command-
|
|
19
|
-
application: async () => (await import("./application.command-
|
|
20
|
-
library: async () => (await import("./library.command-
|
|
21
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
22
|
-
package: async () => (await import("./package.command-
|
|
23
|
-
module: async () => (await import("./module.command-
|
|
24
|
-
page: async () => (await import("./page.command-
|
|
25
|
-
context: async () => (await import("./context.command-
|
|
26
|
-
cloud: async () => (await import("./cloud.command-
|
|
27
|
-
subspace: async () => (await import("./subspace.command-
|
|
28
|
-
guideline: async () => (await import("./guideline.command-
|
|
29
|
-
scalar: async () => (await import("./scalar.command-
|
|
30
|
-
primitive: async () => (await import("./primitive.command-
|
|
31
|
-
quality: async () => (await import("./quality.command-
|
|
32
|
-
repair: async () => (await import("./repair.command-
|
|
33
|
-
workflow: async () => (await import("./workflow.command-
|
|
34
|
-
tunnel: async () => (await import("./tunnel.command-
|
|
16
|
+
workspace: async () => (await import("./workspace.command-4derhzrh.js")).WorkspaceCommand,
|
|
17
|
+
agent: async () => (await import("./agent.command-gn73rhe7.js")).AgentCommand,
|
|
18
|
+
code: async () => (await import("./code.command-18kcm7hq.js")).CodeCommand,
|
|
19
|
+
application: async () => (await import("./application.command-e968t0hw.js")).ApplicationCommand,
|
|
20
|
+
library: async () => (await import("./library.command-9h749a1x.js")).LibraryCommand,
|
|
21
|
+
localRegistry: async () => (await import("./localRegistry.command-2bqqhxyz.js")).LocalRegistryCommand,
|
|
22
|
+
package: async () => (await import("./package.command-mq4bggp6.js")).PackageCommand,
|
|
23
|
+
module: async () => (await import("./module.command-nv8nzgft.js")).ModuleCommand,
|
|
24
|
+
page: async () => (await import("./page.command-j639n707.js")).PageCommand,
|
|
25
|
+
context: async () => (await import("./context.command-trd9bn18.js")).ContextCommand,
|
|
26
|
+
cloud: async () => (await import("./cloud.command-0jm301rr.js")).CloudCommand,
|
|
27
|
+
subspace: async () => (await import("./subspace.command-3k2pmrs4.js")).SubspaceCommand,
|
|
28
|
+
guideline: async () => (await import("./guideline.command-bdmdn2de.js")).GuidelineCommand,
|
|
29
|
+
scalar: async () => (await import("./scalar.command-ma4fpm9m.js")).ScalarCommand,
|
|
30
|
+
primitive: async () => (await import("./primitive.command-kz6849th.js")).PrimitiveCommand,
|
|
31
|
+
quality: async () => (await import("./quality.command-4hyabwkb.js")).QualityCommand,
|
|
32
|
+
repair: async () => (await import("./repair.command-a9awpbqr.js")).RepairCommand,
|
|
33
|
+
workflow: async () => (await import("./workflow.command-t7wqe4h7.js")).WorkflowCommand,
|
|
34
|
+
tunnel: async () => (await import("./tunnel.command-xwr46b66.js")).TunnelCommand
|
|
35
35
|
};
|
|
36
36
|
var commandModuleIds = Object.keys(commandModules);
|
|
37
37
|
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
Lib,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-vpj42xwt.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-3w94e7n3.js";
|
|
9
9
|
import {
|
|
10
10
|
LibraryScript
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-mgxpx3f2.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/library/library.command.ts
|
|
14
14
|
class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
|