@akanjs/cli 3.0.0-beta.20 → 3.0.0-beta.21

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.
Files changed (64) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-awv258wb.js → CodeAgent-q2m47rqp.js} +2 -2
  3. package/{CodeTui-1nqh35ez.js → CodeTui-pdqhc3sn.js} +1 -1
  4. package/{agent.command-1s9ag7sb.js → agent.command-ttn09rx3.js} +5 -5
  5. package/akanCode.js +2 -2
  6. package/{application.command-49hwy6va.js → application.command-7gweenv7.js} +43 -41
  7. package/{applicationBuildRunner-ybyp97pv.js → applicationBuildRunner-38exmejd.js} +2 -2
  8. package/buildBatch.proc.js +10 -4
  9. package/{cloud.command-d7rqtzt9.js → cloud.command-bhztw7c2.js} +9 -8
  10. package/cloud.script-aabyhgba.js +20 -0
  11. package/{code.command-nn48xzej.js → code.command-6s8c0k91.js} +6 -6
  12. package/commandManifest.json +1 -1
  13. package/{context.command-s3mcmvpa.js → context.command-phmgywt2.js} +13 -13
  14. package/context.runner-yvyw5g2d.js +21 -0
  15. package/{guideline.command-sct4qnt5.js → guideline.command-7jk47fgq.js} +2 -2
  16. package/guidelines/agentRule/agentRule.instruction.md +3 -3
  17. package/guidelines/conventions/conventions.instruction.md +17 -5
  18. package/guidelines/runtimeRule/runtimeRule.instruction.md +3 -3
  19. package/incrementalBuilder.proc.js +1 -1
  20. package/{index-5pc1qrbv.js → index-1db2cw0y.js} +2 -2
  21. package/{index-ahemdr5n.js → index-4dn1p115.js} +3 -3
  22. package/{index-13ffe9wp.js → index-7cqjvraf.js} +4 -4
  23. package/{index-8sf7wmdr.js → index-8kb5p54p.js} +5 -5
  24. package/{index-ygn77a5w.js → index-9629w7ns.js} +5 -3
  25. package/{index-ddxvdd1p.js → index-aadpbnt2.js} +5 -5
  26. package/{index-ztp3e73t.js → index-d0arnrm8.js} +1 -1
  27. package/{index-nv5976x3.js → index-dg97qp24.js} +24 -13
  28. package/{index-9d9bgcx4.js → index-ga6hygxr.js} +514 -480
  29. package/index-hr5n7t4x.js +465 -0
  30. package/{index-xqpzbab5.js → index-m0ms3n1c.js} +7 -7
  31. package/{index-as7xmyz8.js → index-mgfx3mfs.js} +5 -4
  32. package/{index-3sq321ak.js → index-pp54p5zk.js} +2 -2
  33. package/{index-xqjwd384.js → index-q44jbw48.js} +1 -1
  34. package/{index-w2zdcw3k.js → index-rmcw8yc8.js} +1 -1
  35. package/{index-dzf3r49a.js → index-rnt66vym.js} +1 -1
  36. package/{index-8mna0947.js → index-tgjy8xf3.js} +4 -4
  37. package/{index-xsjh6nzh.js → index-v5eayqqw.js} +3 -3
  38. package/{index-przybvy5.js → index-wp43xrjv.js} +4 -4
  39. package/{index-31yr441d.js → index-ya5qbmyg.js} +3 -3
  40. package/{index-axzjaqve.js → index-yjkte9aj.js} +5 -4
  41. package/{index-myhc3c1j.js → index-yy4s1j72.js} +1 -1
  42. package/{index-ww4z397j.js → index-z50k041j.js} +82 -168
  43. package/index.js +21 -21
  44. package/{library.command-1gx04jgn.js → library.command-ccb1cp92.js} +3 -3
  45. package/{localRegistry.command-zndxj1q6.js → localRegistry.command-ajb9n87j.js} +8 -7
  46. package/{module.command-3waddk95.js → module.command-5k6h407d.js} +5 -5
  47. package/{package.command-zrc7br1y.js → package.command-e6ntvpez.js} +3 -3
  48. package/package.json +2 -3
  49. package/{page.command-vpjgardh.js → page.command-v4f90wb8.js} +3 -3
  50. package/{primitive.command-sz84tk4t.js → primitive.command-g6km57q5.js} +6 -6
  51. package/{quality.command-g869hafs.js → quality.command-de3p36pz.js} +5 -4
  52. package/{repair.command-chsnjvvv.js → repair.command-d3x1javq.js} +5 -5
  53. package/{scalar.command-2v21newx.js → scalar.command-7ezrac2b.js} +4 -4
  54. package/{subspace.command-ckcbwfp1.js → subspace.command-ps71ynp6.js} +4 -4
  55. package/templates/workspaceRoot/.gitignore.template +0 -1
  56. package/{tunnel.command-kd2yr4fx.js → tunnel.command-hsrv2mny.js} +2 -2
  57. package/{workflow.command-44252cqv.js → workflow.command-z2p32nmf.js} +10 -10
  58. package/{workspace.command-fqcztt5p.js → workspace.command-tmdqkrh0.js} +20 -20
  59. package/applicationReleasePackager-esnrphw8.js +0 -224
  60. package/capacitorApp-1synz4en.js +0 -11
  61. package/cloud.script-bkbpcr96.js +0 -19
  62. package/context.runner-k99nb5pk.js +0 -21
  63. package/index-5e0n4hqx.js +0 -75
  64. package/index-mxav6j3c.js +0 -1377
@@ -6,11 +6,11 @@ import {
6
6
  } from "./index-22d57v4c.js";
7
7
  import {
8
8
  runner
9
- } from "./index-w2zdcw3k.js";
9
+ } from "./index-rmcw8yc8.js";
10
10
  import {
11
11
  WorkspaceExecutor,
12
12
  AppExecutor
13
- } from "./index-9d9bgcx4.js";
13
+ } from "./index-ga6hygxr.js";
14
14
  import {
15
15
  openBrowser
16
16
  } from "./index-9dp031by.js";
@@ -912,8 +912,9 @@ ${run.format(results)}
912
912
  };
913
913
  }
914
914
  async getAkanPkgs(workspace) {
915
- const pkgs = await workspace.getPkgs();
916
- return pkgs.filter((pkg) => pkg === "akanjs" || pkg === "create-akan-workspace" || pkg.startsWith("@akanjs/"));
915
+ const pkgs = (await workspace.getPkgs()).filter((pkg) => pkg === "akanjs" || pkg === "create-akan-workspace" || pkg.startsWith("@akanjs/"));
916
+ const isPrivate = await Promise.all(pkgs.map(async (pkg) => (await workspace.readJson(`pkgs/${pkg}/package.json`)).private));
917
+ return pkgs.filter((_, idx) => isPrivate[idx] !== true);
917
918
  }
918
919
  async deployAkan(workspace, akanPkgs, { registryUrl, confirmPublish = true, tag: distTag } = {}) {
919
920
  const registry = registryUrl ? getNpmRegistryUrl(registryUrl) : undefined;
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  AppExecutor,
4
4
  LibExecutor
5
- } from "./index-9d9bgcx4.js";
5
+ } from "./index-ga6hygxr.js";
6
6
 
7
7
  // pkgs/@akanjs/devkit/workflow/utils.ts
8
8
  var jsonText = (value, { trailingNewline = true } = {}) => `${JSON.stringify(value, null, 2)}${trailingNewline ? `
@@ -36,26 +36,27 @@ import {
36
36
  import {
37
37
  runner,
38
38
  script
39
- } from "./index-w2zdcw3k.js";
39
+ } from "./index-rmcw8yc8.js";
40
40
  import {
41
41
  WorkspaceExecutor,
42
42
  AppExecutor,
43
43
  LibExecutor,
44
44
  PkgExecutor
45
- } from "./index-9d9bgcx4.js";
45
+ } from "./index-ga6hygxr.js";
46
46
  import {
47
47
  LibraryScript
48
- } from "./index-5pc1qrbv.js";
48
+ } from "./index-1db2cw0y.js";
49
+ import {
50
+ resolveMobileTargets,
51
+ NativeApp
52
+ } from "./index-hr5n7t4x.js";
49
53
  import {
50
54
  stripAnsi
51
55
  } from "./index-7md2g9vw.js";
52
56
  import {
53
57
  SlicePlanner,
54
58
  formatSlicePlan
55
- } from "./index-xqjwd384.js";
56
- import {
57
- resolveMobileTargets
58
- } from "./index-5e0n4hqx.js";
59
+ } from "./index-q44jbw48.js";
59
60
  import {
60
61
  openBrowser
61
62
  } from "./index-9dp031by.js";
@@ -1695,9 +1696,7 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
1695
1696
 
1696
1697
  // pkgs/@akanjs/cli/application/application.runner.ts
1697
1698
  import { Logger as Logger3 } from "akanjs/common";
1698
- var loadBuildRunner = async () => (await import("./applicationBuildRunner-ybyp97pv.js")).ApplicationBuildRunner;
1699
- var loadReleasePackager = async () => (await import("./applicationReleasePackager-esnrphw8.js")).ApplicationReleasePackager;
1700
- var loadCapacitorApp = async () => (await import("./capacitorApp-1synz4en.js")).CapacitorApp;
1699
+ var loadBuildRunner = async () => (await import("./applicationBuildRunner-38exmejd.js")).ApplicationBuildRunner;
1701
1700
  var loadPrompts = async () => await import("@inquirer/prompts");
1702
1701
 
1703
1702
  class ApplicationRunner extends runner("application") {
@@ -1889,65 +1888,68 @@ try {
1889
1888
  setTimeout(() => openBrowser(`http://localhost:${env.AKAN_PUBLIC_CLIENT_PORT ?? env.PORT ?? "8282"}`), 3000);
1890
1889
  return appHost;
1891
1890
  }
1892
- async buildIos(app, { target, env = "debug", regenerate = false } = {}) {
1891
+ async buildMobile(app, platform, { target, env = "debug", profile = "release" } = {}) {
1893
1892
  const targets = await resolveMobileTargets(app, target);
1894
1893
  await this.#buildMobileCsr(app, env);
1895
1894
  await this.#runMobileTargets(targets, async (mobileTarget) => {
1896
- await new (await loadCapacitorApp())(app, mobileTarget.config).buildIos({ env, regenerate });
1895
+ this.#reportBuild(app, mobileTarget, await new NativeApp(app, mobileTarget).build(platform, { profile }));
1897
1896
  });
1898
1897
  }
1899
- async startIos(app, {
1900
- open = false,
1901
- operation = "local",
1902
- env = "local",
1903
- target,
1904
- device,
1905
- regenerate = false,
1906
- noAllowProvisioningUpdates = false
1907
- } = {}) {
1898
+ async startMobile(app, platform, { target, env = "local", operation = "local", device, teamId } = {}) {
1908
1899
  const targets = await resolveMobileTargets(app, target);
1909
- if (operation === "release")
1900
+ const [mobileTarget] = targets;
1901
+ if (!mobileTarget || targets.length > 1)
1902
+ throw new Error(`start-${platform === "ios" || platform === "android" ? platform : "desktop"} runs one mobile target at a time; pass --target <name>.`);
1903
+ const nativeApp = new NativeApp(app, mobileTarget);
1904
+ const selection = { ...device ? { device } : {}, ...teamId ? { teamId } : {} };
1905
+ if (operation === "release") {
1910
1906
  await this.#buildMobileCsr(app, env);
1911
- await this.#runMobileTargets(targets, async (mobileTarget) => {
1912
- const capacitorApp = new (await loadCapacitorApp())(app, mobileTarget.config);
1913
- await capacitorApp.runIos({ operation, env, regenerate, noAllowProvisioningUpdates, iosDeviceId: device });
1914
- if (open)
1915
- await capacitorApp.openIos();
1907
+ const running = await nativeApp.run(platform, { ...selection, profile: "release" });
1908
+ await running.exited;
1909
+ return;
1910
+ }
1911
+ const upstream = `http://localhost:${await app.getDevPort()}`;
1912
+ if (!await ApplicationRunner.#answers(upstream))
1913
+ throw new Error(`No dev server answers on ${upstream}; run \`akan start ${app.name}\` first.`);
1914
+ const { i18n } = await app.getConfig();
1915
+ const session = await nativeApp.dev(platform, { upstream, lang: i18n.defaultLocale, ...selection });
1916
+ app.log(`${app.name}/${mobileTarget.name} on ${platform} follows ${upstream} through ${session.gateway}.`);
1917
+ process.once("SIGINT", () => {
1918
+ session.stop().finally(() => process.exit(130));
1916
1919
  });
1920
+ await session.exited;
1917
1921
  }
1918
- async releaseIos(app, { target, env = "main", regenerate = false } = {}) {
1919
- const targets = await resolveMobileTargets(app, target);
1920
- await this.#buildMobileCsr(app, env);
1921
- for (const mobileTarget of targets) {
1922
- await new (await loadCapacitorApp())(app, mobileTarget.config).buildIos({ env, regenerate });
1922
+ async startDesktop(app, options = {}) {
1923
+ await this.startMobile(app, NativeApp.desktopPlatform(), options);
1924
+ }
1925
+ static async#answers(url) {
1926
+ try {
1927
+ await fetch(url, { signal: AbortSignal.timeout(3000) });
1928
+ return true;
1929
+ } catch {
1930
+ return false;
1923
1931
  }
1924
1932
  }
1925
- async buildAndroid(app, { target, env = "debug", regenerate = false } = {}) {
1933
+ async releaseIos(app, { target, env = "main", teamId, adHoc = false } = {}) {
1926
1934
  const targets = await resolveMobileTargets(app, target);
1927
1935
  await this.#buildMobileCsr(app, env);
1928
- await this.#runMobileTargets(targets, async (mobileTarget) => {
1929
- await new (await loadCapacitorApp())(app, mobileTarget.config).buildAndroid("apk", { env, regenerate });
1930
- });
1931
- }
1932
- async startAndroid(app, { open = false, operation = "local", env = "local", target, regenerate = false } = {}) {
1933
- const targets = await resolveMobileTargets(app, target);
1934
- if (operation === "release")
1935
- await this.#buildMobileCsr(app, env);
1936
- await this.#runMobileTargets(targets, async (mobileTarget) => {
1937
- const capacitorApp = new (await loadCapacitorApp())(app, mobileTarget.config);
1938
- await capacitorApp.runAndroid({ operation, env, regenerate });
1939
- if (open)
1940
- await capacitorApp.openAndroid();
1941
- });
1936
+ for (const mobileTarget of targets)
1937
+ this.#reportBuild(app, mobileTarget, await new NativeApp(app, mobileTarget).releaseIos({ teamId, adHoc }));
1942
1938
  }
1943
- async releaseAndroid(app, assembleType, { target, env = "main", regenerate = false } = {}) {
1939
+ async releaseAndroid(app, format, { target, env = "main" } = {}) {
1944
1940
  const targets = await resolveMobileTargets(app, target);
1941
+ NativeApp.androidSigning();
1945
1942
  await this.#buildMobileCsr(app, env);
1946
- for (const mobileTarget of targets) {
1947
- await new (await loadCapacitorApp())(app, mobileTarget.config).buildAndroid(assembleType, { env, regenerate });
1948
- app.log(`Release Android ${app.name}/${mobileTarget.name} ${assembleType} Completed.`);
1949
- app.log(`Path : ${app.cwdPath}/android/app/build/outputs/${assembleType === "apk" ? "apk" : "bundle"}/release`);
1950
- }
1943
+ for (const mobileTarget of targets)
1944
+ this.#reportBuild(app, mobileTarget, await new NativeApp(app, mobileTarget).releaseAndroid({ formats: [format] }));
1945
+ }
1946
+ #reportBuild(app, mobileTarget, { artifacts, warnings, signing }) {
1947
+ for (const warning of warnings)
1948
+ app.logger.warn(warning);
1949
+ if (signing)
1950
+ app.log(`Signed with ${signing.identity} (${signing.profile}, team ${signing.teamId})`);
1951
+ for (const artifact of artifacts)
1952
+ app.log(`${app.name}/${mobileTarget.name} ${artifact.kind}: ${artifact.path}`);
1951
1953
  }
1952
1954
  async#buildMobileCsr(app, env) {
1953
1955
  const prevEnv = {
@@ -1990,17 +1992,6 @@ try {
1990
1992
  }
1991
1993
  throw new Error(`${failures.length}/${results.length} mobile targets failed`);
1992
1994
  }
1993
- async codepush(app) {
1994
- throw new Error(`akan codepush is still in development and deploys nothing yet, so ${app.name} was not updated. To release the app's source with OTA update support, run \`akan release-source ${app.name}\`.`);
1995
- }
1996
- async#initCapacitorApp(app) {
1997
- const [target] = await resolveMobileTargets(app, undefined);
1998
- if (!target)
1999
- throw new Error(`No mobile target configured for ${app.name}`);
2000
- const capacitorApp = new (await loadCapacitorApp())(app, target.config);
2001
- await capacitorApp.init();
2002
- return capacitorApp;
2003
- }
2004
1995
  #getLocalDatabaseServices(mode) {
2005
1996
  if (mode === "single")
2006
1997
  return [];
@@ -2056,22 +2047,6 @@ ${detail}`
2056
2047
  async dbdown(workspace) {
2057
2048
  await workspace.spawn(`docker`, ["compose", "down"], { cwd: `${workspace.workspaceRoot}/local` });
2058
2049
  }
2059
- async configureApp(app) {
2060
- const capacitorApp = await this.#initCapacitorApp(app);
2061
- if (await (await loadPrompts()).confirm({ message: "want to add camera permission?" }))
2062
- await capacitorApp.addCamera();
2063
- if (await (await loadPrompts()).confirm({ message: "want to add contact permission?" }))
2064
- await capacitorApp.addContact();
2065
- if (await (await loadPrompts()).confirm({ message: "want to add location permission?" }))
2066
- await capacitorApp.addLocation();
2067
- await capacitorApp.save();
2068
- }
2069
- async releaseSource(app, { rebuild, buildNum = 0, environment = "debug", local = true } = {}) {
2070
- const packager = new (await loadReleasePackager())(app, { build: () => this.build(app).then(() => {
2071
- return;
2072
- }) });
2073
- await packager.releaseSource({ rebuild, buildNum, environment, local });
2074
- }
2075
2050
  }
2076
2051
 
2077
2052
  // pkgs/@akanjs/cli/application/hostProcessProbe.ts
@@ -2884,21 +2859,6 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
2884
2859
  throw new Error(`Database mode '${databaseMode}' requires missing dependencies: ${installSpecs.join(", ")}.`);
2885
2860
  await this.#addDependencies(app, installSpecs, `database dependencies for ${databaseMode} mode`);
2886
2861
  }
2887
- async confirmMobileDependencyInstall(installSpecs) {
2888
- return await confirm({
2889
- message: `Mobile builds require missing dependencies: ${installSpecs.join(", ")}. Install them now?`,
2890
- default: true
2891
- });
2892
- }
2893
- async syncMobileDependencies(app, akanConfig) {
2894
- const installSpecs = akanConfig.getMissingMobileDependencySpecs();
2895
- if (installSpecs.length === 0)
2896
- return;
2897
- const shouldInstall = await this.confirmMobileDependencyInstall(installSpecs);
2898
- if (!shouldInstall)
2899
- throw new Error(`Mobile builds require missing dependencies: ${installSpecs.join(", ")}.`);
2900
- await this.#addDependencies(app, installSpecs, "mobile dependencies");
2901
- }
2902
2862
  async#addDependencies(app, installSpecs, what) {
2903
2863
  const spinner = app.workspace.spinning(`Installing ${what}...`);
2904
2864
  try {
@@ -2910,27 +2870,6 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
2910
2870
  throw error;
2911
2871
  }
2912
2872
  }
2913
- async syncMobileAppCapacitorPlugins(app, akanConfig) {
2914
- const plugins = akanConfig.getMobileAppCapacitorPlugins();
2915
- if (plugins.length === 0)
2916
- return;
2917
- const packageJson = await app.getPackageJson({ refresh: true });
2918
- const dependencies = packageJson.dependencies ?? {};
2919
- const missing = plugins.filter((plugin) => !dependencies[plugin]);
2920
- if (missing.length === 0)
2921
- return;
2922
- const spinner = app.workspace.spinning(`Adding default Capacitor plugins to ${app.name}...`);
2923
- try {
2924
- packageJson.dependencies = { ...dependencies, ...Object.fromEntries(missing.map((plugin) => [plugin, "*"])) };
2925
- await app.setPackageJson(packageJson);
2926
- await app.workspace.spawn("bun", ["install"], { stdio: "inherit" });
2927
- await app.getPackageJson({ refresh: true });
2928
- spinner.succeed(`Added default Capacitor plugins to ${app.name}: ${missing.join(", ")}`);
2929
- } catch (error) {
2930
- spinner.fail(`Failed to add default Capacitor plugins to ${app.name}`);
2931
- throw error;
2932
- }
2933
- }
2934
2873
  async createApplication(appName, workspace, { start = false, libs = [] } = {}) {
2935
2874
  const spinner = workspace.spinning("Creating application...");
2936
2875
  const app = await this.applicationRunner.createApplication(appName, workspace, libs);
@@ -3107,72 +3046,47 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
3107
3046
  started = true;
3108
3047
  return started;
3109
3048
  }
3110
- async buildIos(app, { write = true, target, env = "debug", regenerate = false } = {}) {
3049
+ async buildIos(app, { write = true, ...options } = {}) {
3111
3050
  await app.scanSync({ write });
3112
- await this.applicationRunner.buildIos(app, { target, env, regenerate });
3051
+ await this.applicationRunner.buildMobile(app, "ios", options);
3113
3052
  }
3114
- async startIos(app, {
3115
- open = false,
3116
- operation = "local",
3117
- env = "local",
3118
- write = true,
3119
- target,
3120
- device,
3121
- regenerate = false,
3122
- noAllowProvisioningUpdates = false
3123
- } = {}) {
3053
+ async buildAndroid(app, { write = true, ...options } = {}) {
3124
3054
  await app.scanSync({ write });
3125
- const akanConfig = await app.getConfig();
3126
- await this.syncMobileDependencies(app, akanConfig);
3127
- await this.syncMobileAppCapacitorPlugins(app, akanConfig);
3128
- await this.applicationRunner.startIos(app, {
3129
- open,
3130
- operation,
3131
- env,
3132
- target,
3133
- device,
3134
- regenerate,
3135
- noAllowProvisioningUpdates
3136
- });
3055
+ await this.applicationRunner.buildMobile(app, "android", options);
3137
3056
  }
3138
- async releaseIos(app, { write = true, target, env = "main", regenerate = false, allowLocalRelease = false } = {}) {
3057
+ async startIos(app, { write = true, ...options } = {}) {
3139
3058
  await app.scanSync({ write });
3140
- if (env === "local" && !allowLocalRelease)
3141
- throw new Error("releaseIos --env local is blocked. Pass allowLocalRelease only for explicit local release testing.");
3142
- await this.applicationRunner.releaseIos(app, { target, env, regenerate });
3059
+ await this.applicationRunner.startMobile(app, "ios", options);
3143
3060
  }
3144
- async buildAndroid(app, { write = true, target, env = "debug", regenerate = false } = {}) {
3061
+ async startAndroid(app, { write = true, ...options } = {}) {
3145
3062
  await app.scanSync({ write });
3146
- await this.applicationRunner.buildAndroid(app, { target, env, regenerate });
3063
+ await this.applicationRunner.startMobile(app, "android", options);
3147
3064
  }
3148
- async startAndroid(app, {
3149
- open = false,
3150
- operation = "local",
3151
- env = "local",
3065
+ async startDesktop(app, { write = true, ...options } = {}) {
3066
+ await app.scanSync({ write });
3067
+ await this.applicationRunner.startDesktop(app, options);
3068
+ }
3069
+ async releaseIos(app, {
3152
3070
  write = true,
3153
- target,
3154
- regenerate = false
3071
+ allowLocalRelease = false,
3072
+ ...options
3155
3073
  } = {}) {
3156
3074
  await app.scanSync({ write });
3157
- const akanConfig = await app.getConfig();
3158
- await this.syncMobileDependencies(app, akanConfig);
3159
- await this.syncMobileAppCapacitorPlugins(app, akanConfig);
3160
- await this.applicationRunner.startAndroid(app, { open, operation, env, target, regenerate });
3075
+ ApplicationScript.#assertReleaseEnv("releaseIos", options.env ?? "main", allowLocalRelease);
3076
+ await this.applicationRunner.releaseIos(app, options);
3161
3077
  }
3162
- async releaseAndroid(app, assembleType, { write = true, target, env = "main", regenerate = false, allowLocalRelease = false } = {}) {
3078
+ async releaseAndroid(app, format, {
3079
+ write = true,
3080
+ allowLocalRelease = false,
3081
+ ...options
3082
+ } = {}) {
3163
3083
  await app.scanSync({ write });
3164
- if (env === "local" && !allowLocalRelease)
3165
- throw new Error("releaseAndroid --env local is blocked. Pass allowLocalRelease only for explicit local release testing.");
3166
- await this.applicationRunner.releaseAndroid(app, assembleType, { target, env, regenerate });
3084
+ ApplicationScript.#assertReleaseEnv("releaseAndroid", options.env ?? "main", allowLocalRelease);
3085
+ await this.applicationRunner.releaseAndroid(app, format, options);
3167
3086
  }
3168
- async configureApp(app) {
3169
- await this.applicationRunner.configureApp(app);
3170
- }
3171
- async releaseSource(app, options) {
3172
- await this.applicationRunner.releaseSource(app, options);
3173
- }
3174
- async codepush(app) {
3175
- await this.applicationRunner.codepush(app);
3087
+ static #assertReleaseEnv(command, env, allowLocalRelease) {
3088
+ if (env === "local" && !allowLocalRelease)
3089
+ throw new Error(`${command} --env local is blocked. Pass allowLocalRelease only for explicit local release testing.`);
3176
3090
  }
3177
3091
  async transferDatabase(app, direction, dir) {
3178
3092
  await this.applicationRunner.transferDatabase(app, direction, dir);
package/index.js CHANGED
@@ -4,34 +4,34 @@ import {
4
4
  getTargetMetas,
5
5
  getTargetCommandNames,
6
6
  runCommands
7
- } from "./index-w2zdcw3k.js";
7
+ } from "./index-rmcw8yc8.js";
8
8
  import"./index-5b6tavv3.js";
9
- import"./index-9d9bgcx4.js";
9
+ import"./index-ga6hygxr.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-fqcztt5p.js")).WorkspaceCommand,
17
- agent: async () => (await import("./agent.command-1s9ag7sb.js")).AgentCommand,
18
- code: async () => (await import("./code.command-nn48xzej.js")).CodeCommand,
19
- application: async () => (await import("./application.command-49hwy6va.js")).ApplicationCommand,
20
- library: async () => (await import("./library.command-1gx04jgn.js")).LibraryCommand,
21
- localRegistry: async () => (await import("./localRegistry.command-zndxj1q6.js")).LocalRegistryCommand,
22
- package: async () => (await import("./package.command-zrc7br1y.js")).PackageCommand,
23
- module: async () => (await import("./module.command-3waddk95.js")).ModuleCommand,
24
- page: async () => (await import("./page.command-vpjgardh.js")).PageCommand,
25
- context: async () => (await import("./context.command-s3mcmvpa.js")).ContextCommand,
26
- cloud: async () => (await import("./cloud.command-d7rqtzt9.js")).CloudCommand,
27
- subspace: async () => (await import("./subspace.command-ckcbwfp1.js")).SubspaceCommand,
28
- guideline: async () => (await import("./guideline.command-sct4qnt5.js")).GuidelineCommand,
29
- scalar: async () => (await import("./scalar.command-2v21newx.js")).ScalarCommand,
30
- primitive: async () => (await import("./primitive.command-sz84tk4t.js")).PrimitiveCommand,
31
- quality: async () => (await import("./quality.command-g869hafs.js")).QualityCommand,
32
- repair: async () => (await import("./repair.command-chsnjvvv.js")).RepairCommand,
33
- workflow: async () => (await import("./workflow.command-44252cqv.js")).WorkflowCommand,
34
- tunnel: async () => (await import("./tunnel.command-kd2yr4fx.js")).TunnelCommand
16
+ workspace: async () => (await import("./workspace.command-tmdqkrh0.js")).WorkspaceCommand,
17
+ agent: async () => (await import("./agent.command-ttn09rx3.js")).AgentCommand,
18
+ code: async () => (await import("./code.command-6s8c0k91.js")).CodeCommand,
19
+ application: async () => (await import("./application.command-7gweenv7.js")).ApplicationCommand,
20
+ library: async () => (await import("./library.command-ccb1cp92.js")).LibraryCommand,
21
+ localRegistry: async () => (await import("./localRegistry.command-ajb9n87j.js")).LocalRegistryCommand,
22
+ package: async () => (await import("./package.command-e6ntvpez.js")).PackageCommand,
23
+ module: async () => (await import("./module.command-5k6h407d.js")).ModuleCommand,
24
+ page: async () => (await import("./page.command-v4f90wb8.js")).PageCommand,
25
+ context: async () => (await import("./context.command-phmgywt2.js")).ContextCommand,
26
+ cloud: async () => (await import("./cloud.command-bhztw7c2.js")).CloudCommand,
27
+ subspace: async () => (await import("./subspace.command-ps71ynp6.js")).SubspaceCommand,
28
+ guideline: async () => (await import("./guideline.command-7jk47fgq.js")).GuidelineCommand,
29
+ scalar: async () => (await import("./scalar.command-7ezrac2b.js")).ScalarCommand,
30
+ primitive: async () => (await import("./primitive.command-g6km57q5.js")).PrimitiveCommand,
31
+ quality: async () => (await import("./quality.command-de3p36pz.js")).QualityCommand,
32
+ repair: async () => (await import("./repair.command-d3x1javq.js")).RepairCommand,
33
+ workflow: async () => (await import("./workflow.command-z2p32nmf.js")).WorkflowCommand,
34
+ tunnel: async () => (await import("./tunnel.command-hsrv2mny.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-w2zdcw3k.js";
6
+ } from "./index-rmcw8yc8.js";
7
7
  import"./index-5b6tavv3.js";
8
- import"./index-9d9bgcx4.js";
8
+ import"./index-ga6hygxr.js";
9
9
  import {
10
10
  LibraryScript
11
- } from "./index-5pc1qrbv.js";
11
+ } from "./index-1db2cw0y.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/library/library.command.ts
14
14
  class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
@@ -4,27 +4,28 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-w2zdcw3k.js";
7
+ } from "./index-rmcw8yc8.js";
8
8
  import"./index-5b6tavv3.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-9d9bgcx4.js";
11
+ } from "./index-ga6hygxr.js";
12
12
  import"./index-khpfpcsd.js";
13
- import"./index-5pc1qrbv.js";
13
+ import"./index-1db2cw0y.js";
14
14
  import {
15
15
  ApplicationScript
16
- } from "./index-ww4z397j.js";
16
+ } from "./index-z50k041j.js";
17
+ import"./index-hr5n7t4x.js";
17
18
  import"./index-7md2g9vw.js";
18
19
  import"./index-22d57v4c.js";
19
20
  import {
20
21
  getNpmRegistryUrl,
21
22
  CloudRunner
22
- } from "./index-axzjaqve.js";
23
+ } from "./index-yjkte9aj.js";
23
24
  import"./index-3t7g9e4r.js";
24
25
  import {
25
26
  PackageScript
26
- } from "./index-as7xmyz8.js";
27
- import"./index-xqjwd384.js";
27
+ } from "./index-mgfx3mfs.js";
28
+ import"./index-q44jbw48.js";
28
29
 
29
30
  // pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
30
31
  import { mkdir, rm } from "fs/promises";
@@ -3,16 +3,16 @@ import {
3
3
  Sys,
4
4
  Module,
5
5
  command
6
- } from "./index-w2zdcw3k.js";
6
+ } from "./index-rmcw8yc8.js";
7
7
  import"./index-5b6tavv3.js";
8
- import"./index-9d9bgcx4.js";
8
+ import"./index-ga6hygxr.js";
9
9
  import {
10
10
  renderPrimitiveReport
11
- } from "./index-myhc3c1j.js";
12
- import"./index-dzf3r49a.js";
11
+ } from "./index-yy4s1j72.js";
12
+ import"./index-rnt66vym.js";
13
13
  import {
14
14
  ModuleScript
15
- } from "./index-8mna0947.js";
15
+ } from "./index-tgjy8xf3.js";
16
16
 
17
17
  // pkgs/@akanjs/cli/module/module.command.ts
18
18
  import { Logger, lowerlize } from "akanjs/common";
@@ -3,13 +3,13 @@ import {
3
3
  Pkg,
4
4
  Workspace,
5
5
  command
6
- } from "./index-w2zdcw3k.js";
6
+ } from "./index-rmcw8yc8.js";
7
7
  import"./index-5b6tavv3.js";
8
- import"./index-9d9bgcx4.js";
8
+ import"./index-ga6hygxr.js";
9
9
  import"./index-3t7g9e4r.js";
10
10
  import {
11
11
  PackageScript
12
- } from "./index-as7xmyz8.js";
12
+ } from "./index-mgfx3mfs.js";
13
13
 
14
14
  // pkgs/@akanjs/cli/package/package.command.ts
15
15
  class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.0.0-beta.20",
3
+ "version": "3.0.0-beta.21",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -39,8 +39,7 @@
39
39
  "@earendil-works/pi-tui": "0.86.1",
40
40
  "@inquirer/prompts": "^8.4.3",
41
41
  "@tailwindcss/node": "^4.3.0",
42
- "@trapezedev/project": "^7.1.4",
43
- "akanjs": "3.0.0-beta.20",
42
+ "akanjs": "3.0.0-beta.21",
44
43
  "chalk": "^5.6.2",
45
44
  "commander": "^14.0.3",
46
45
  "dayjs": "^1.11.20",
@@ -3,12 +3,12 @@ import {
3
3
  App,
4
4
  Module,
5
5
  command
6
- } from "./index-w2zdcw3k.js";
6
+ } from "./index-rmcw8yc8.js";
7
7
  import"./index-5b6tavv3.js";
8
- import"./index-9d9bgcx4.js";
8
+ import"./index-ga6hygxr.js";
9
9
  import {
10
10
  PageScript
11
- } from "./index-dzf3r49a.js";
11
+ } from "./index-rnt66vym.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/page/page.command.ts
14
14
  class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-w2zdcw3k.js";
5
+ } from "./index-rmcw8yc8.js";
6
6
  import"./index-5b6tavv3.js";
7
- import"./index-9d9bgcx4.js";
7
+ import"./index-ga6hygxr.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-myhc3c1j.js";
11
- import"./index-dzf3r49a.js";
12
- import"./index-8mna0947.js";
10
+ } from "./index-yy4s1j72.js";
11
+ import"./index-rnt66vym.js";
12
+ import"./index-tgjy8xf3.js";
13
13
  import {
14
14
  PrimitiveScript
15
- } from "./index-przybvy5.js";
15
+ } from "./index-wp43xrjv.js";
16
16
 
17
17
  // pkgs/@akanjs/cli/primitive/primitive.command.ts
18
18
  import { Logger } from "akanjs/common";
@@ -3,13 +3,14 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-w2zdcw3k.js";
6
+ } from "./index-rmcw8yc8.js";
7
7
  import"./index-5b6tavv3.js";
8
8
  import {
9
9
  rootAllowedFiles,
10
10
  rootAllowedDirs,
11
- isAllowedLibFacetRootFile
12
- } from "./index-9d9bgcx4.js";
11
+ isAllowedLibFacetRootFile,
12
+ rootEntryHintOf
13
+ } from "./index-ga6hygxr.js";
13
14
 
14
15
  // pkgs/@akanjs/devkit/qualityScanner.ts
15
16
  import { createHash } from "crypto";
@@ -696,7 +697,7 @@ class AkanQualityScanner {
696
697
  const allowed = isDir ? rootAllowedDirs[type].has(name) : rootAllowedFiles[type].has(name);
697
698
  const kind = isDir ? "folder" : "file";
698
699
  if (!allowed)
699
- warnings.push(fileWarning(`akan.layout.${type}-root-${kind}`, "layout", sourceFile.file, `Unexpected ${type} root ${kind} "${name}". Keep ${type} code in conventional ${type} folders.`));
700
+ warnings.push(fileWarning(`akan.layout.${type}-root-${kind}`, "layout", sourceFile.file, `Unexpected ${type} root ${kind} "${name}". ${rootEntryHintOf(type, name) ?? `Keep ${type} code in conventional ${type} folders.`}`));
700
701
  }
701
702
  const libFacetFile = getLibFacetRootFile(sourceFile.file);
702
703
  if (libFacetFile && !isAllowedLibFacetRootFile(libFacetFile))
@@ -3,15 +3,15 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-w2zdcw3k.js";
6
+ } from "./index-rmcw8yc8.js";
7
7
  import"./index-5b6tavv3.js";
8
- import"./index-9d9bgcx4.js";
8
+ import"./index-ga6hygxr.js";
9
9
  import"./index-hj6w4ka1.js";
10
- import"./index-myhc3c1j.js";
11
- import"./index-ygn77a5w.js";
10
+ import"./index-yy4s1j72.js";
11
+ import"./index-9629w7ns.js";
12
12
  import {
13
13
  RepairRunner
14
- } from "./index-31yr441d.js";
14
+ } from "./index-ya5qbmyg.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/repair/repair.script.ts
17
17
  import { Logger } from "akanjs/common";