@akanjs/cli 3.0.0-alpha.11 → 3.0.0-alpha.110

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 (140) hide show
  1. package/.build-stamp +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/{abstractCompactor-e5yq60qz.js → abstractCompactor-mjh5ppsq.js} +3 -5
  5. package/{agent.command-a3n15c6t.js → agent.command-d2gfxfck.js} +11 -13
  6. package/{application.command-rdm3et0g.js → application.command-pj2m7584.js} +65 -38
  7. package/{applicationBuildRunner-6m8n71w4.js → applicationBuildRunner-kxwbssgn.js} +27 -23
  8. package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-4yasxwv9.js} +8 -9
  9. package/buildBatch.proc.js +12 -14
  10. package/capacitorApp-36rbr858.js +12 -0
  11. package/{cloud.command-56aeekqn.js → cloud.command-gxqp8xdv.js} +15 -18
  12. package/commandManifest.json +1 -1
  13. package/{context.command-ysxawe7h.js → context.command-ez8a0zyz.js} +19 -23
  14. package/dependencyScanner-shs82ynp.js +8 -0
  15. package/devTui-40ggmd99.js +553 -0
  16. package/devTuiView-c08ccbat.js +9 -0
  17. package/getDirname-dr3jz1xg.js +7 -0
  18. package/{guideline.command-yqf9a372.js → guideline.command-xmqwx8zm.js} +24 -22
  19. package/guidelines/agentRule/agentRule.generate.json +31 -0
  20. package/guidelines/agentRule/agentRule.instruction.md +531 -0
  21. package/guidelines/conventions/conventions.instruction.md +493 -369
  22. package/guidelines/framework/framework.generate.json +3 -2
  23. package/guidelines/framework/framework.instruction.md +0 -9
  24. package/guidelines/mcpRule/mcpRule.generate.json +35 -0
  25. package/guidelines/mcpRule/mcpRule.instruction.md +460 -0
  26. package/guidelines/modelStore/modelStore.instruction.md +12 -0
  27. package/guidelines/modelTemplate/modelTemplate.instruction.md +5 -0
  28. package/guidelines/queryRule/queryRule.generate.json +31 -0
  29. package/guidelines/queryRule/queryRule.instruction.md +178 -0
  30. package/guidelines/runtimeRule/runtimeRule.generate.json +25 -0
  31. package/guidelines/runtimeRule/runtimeRule.instruction.md +220 -0
  32. package/guidelines/ssrRule/ssrRule.instruction.md +51 -5
  33. package/guidelines/transportRule/transportRule.generate.json +31 -0
  34. package/guidelines/transportRule/transportRule.instruction.md +60 -0
  35. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +54 -764
  36. package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +33 -0
  37. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +467 -0
  38. package/incrementalBuilder.proc.js +26 -25
  39. package/{index-8pd02prk.js → index-259dsnz3.js} +58 -25
  40. package/{index-yzsxc30b.js → index-2tv3fdx4.js} +975 -234
  41. package/index-3d9y066c.js +76 -0
  42. package/{index-76rn3g2c.js → index-47pj3aee.js} +4 -4
  43. package/{index-m90fn8xe.js → index-4edzf1gr.js} +32 -32
  44. package/{index-3789fdpg.js → index-600zhnve.js} +94 -61
  45. package/{index-1577bej2.js → index-6wwzs1bc.js} +2 -2
  46. package/{index-cv9cxs5k.js → index-7737gxcp.js} +18 -18
  47. package/{index-a5cs7d8r.js → index-8few9nyh.js} +13 -13
  48. package/{index-mewacxye.js → index-8pm30m73.js} +57 -57
  49. package/{index-wnp7hwq7.js → index-92zztqy1.js} +7 -7
  50. package/{index-fgc8r6dj.js → index-a5vmm6x4.js} +3 -1
  51. package/{index-cav1azma.js → index-a64esmtb.js} +1106 -1369
  52. package/{index-nwqqssnb.js → index-aj7tyh5w.js} +26 -23
  53. package/{index-xys926f2.js → index-by5gpp8x.js} +4 -4
  54. package/{index-yzmqvg23.js → index-fz5q3gd7.js} +8 -8
  55. package/{index-kcsa1zff.js → index-gyd220p2.js} +4 -4
  56. package/{index-j37qq1f2.js → index-h7yw2z9n.js} +7 -7
  57. package/{index-bjpxzr6s.js → index-hwkygn9s.js} +51 -3
  58. package/index-j9yhg404.js +159 -0
  59. package/{index-46tjzh6s.js → index-kcxmv48c.js} +29 -29
  60. package/{index-0cj2zxbm.js → index-kn1h7p1x.js} +12 -11
  61. package/{index-e4b2ae6b.js → index-ktb5njgy.js} +41 -34
  62. package/{index-etwh7sd3.js → index-mak3cd28.js} +100 -32
  63. package/{index-xjd3rqzj.js → index-n68jx79w.js} +6 -15
  64. package/{index-z1s5f4e0.js → index-ne2qy0nk.js} +36 -37
  65. package/{index-65aeh789.js → index-pnqbkf5p.js} +1 -1
  66. package/{index-67546d0j.js → index-q0y2jq9j.js} +14 -2
  67. package/{index-4mgkgba3.js → index-rwg2aa4f.js} +14 -14
  68. package/{index-bzznxgcx.js → index-v0qh106m.js} +1002 -128
  69. package/{index-j9cxndc0.js → index-w8kmx1b6.js} +20 -11
  70. package/{index-h5whaj26.js → index-ws5e0j51.js} +16 -12
  71. package/{index-9va8zayb.js → index-wt7qrtd4.js} +27 -27
  72. package/index.js +22 -25
  73. package/{library.command-x6t29a30.js → library.command-nbsky672.js} +11 -10
  74. package/{localRegistry.command-649g1n7b.js → localRegistry.command-ts6t5e5a.js} +20 -23
  75. package/{module.command-8w8ys5t3.js → module.command-29vqzrh8.js} +13 -16
  76. package/{package.command-zgy7f3fz.js → package.command-axv0abmn.js} +8 -10
  77. package/package.json +5 -7
  78. package/{page.command-yjmnkyk2.js → page.command-vs9s3zrh.js} +7 -9
  79. package/{primitive.command-gfqaagsg.js → primitive.command-cbxmqbtc.js} +13 -16
  80. package/{quality.command-ec8r1dn3.js → quality.command-gmbs7nws.js} +184 -334
  81. package/recipeScanner-fpagtgc1.js +11 -0
  82. package/{repair.command-p9ey6mkm.js → repair.command-bqsjptsj.js} +12 -14
  83. package/{routeSourceValidator-e4jmbfcx.js → routeSourceValidator-apyqw7wk.js} +90 -19
  84. package/{scalar.command-9dhmqhtm.js → scalar.command-6k1vhe9s.js} +11 -14
  85. package/subspace.command-35a3t6vv.js +755 -0
  86. package/templates/app/env/env.client.debug.ts.template +1 -5
  87. package/templates/app/env/env.client.develop.ts.template +1 -5
  88. package/templates/app/env/env.client.local.ts.template +1 -5
  89. package/templates/app/env/env.client.main.ts.template +1 -5
  90. package/templates/app/env/env.client.testing.ts.template +1 -5
  91. package/templates/app/env/env.client.type.ts +2 -6
  92. package/templates/app/env/env.server.debug.ts.template +1 -5
  93. package/templates/app/env/env.server.develop.ts.template +1 -5
  94. package/templates/app/env/env.server.local.ts.template +1 -5
  95. package/templates/app/env/env.server.main.ts.template +1 -5
  96. package/templates/app/main.ts +3 -1
  97. package/templates/app/page/_index.tsx +3 -3
  98. package/templates/app/page/_layout.tsx +31 -32
  99. package/templates/appSample/lib/task/task.signal.ts +11 -6
  100. package/templates/appSample/page/task/[taskId]/_index.tsx +22 -27
  101. package/templates/appSample/page/task/[taskId]/edit.tsx +25 -30
  102. package/templates/appSample/page/task/_index.tsx +3 -7
  103. package/templates/appSample/page/task/_layout.tsx +4 -15
  104. package/templates/appSample/page/task/new.tsx +4 -10
  105. package/templates/appSample/srvkit/AuthGuard.ts +2 -2
  106. package/templates/crudPages/[__model__Id]/edit/page.tsx +27 -29
  107. package/templates/crudPages/[__model__Id]/page.tsx +24 -32
  108. package/templates/crudPages/new/page.tsx +26 -25
  109. package/templates/crudPages/page.tsx +27 -26
  110. package/templates/crudSinglePage/page.tsx +26 -21
  111. package/templates/env/_env.server.type.ts +7 -5
  112. package/templates/lib/db.ts +1 -1
  113. package/templates/lib/dict.ts +1 -1
  114. package/templates/lib/sig.ts +5 -1
  115. package/templates/lib/srv.ts +6 -2
  116. package/templates/module/__model__.dictionary.ts +4 -1
  117. package/templates/module/__model__.signal.ts +2 -3
  118. package/templates/module/__model__.store.ts +1 -2
  119. package/templates/workspaceRoot/.gitignore.template +0 -1
  120. package/templates/workspaceRoot/.husky/pre-commit.template +16 -0
  121. package/templates/workspaceRoot/.vscode/settings.json.template +1 -1
  122. package/templates/workspaceRoot/AGENTS.md.template +4 -0
  123. package/templates/workspaceRoot/CLAUDE.md.template +19 -0
  124. package/templates/workspaceRoot/biome.json.template +1 -1
  125. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +10 -14
  126. package/templates/workspaceRoot/docs/GENERATED.md.template +12 -10
  127. package/templates/workspaceRoot/package.json.template +2 -4
  128. package/typeChecker-3xgrzc2v.js +7 -0
  129. package/typecheck.proc.js +4 -5
  130. package/{workflow.command-ycwc6zr6.js → workflow.command-nwpcdc8p.js} +22 -25
  131. package/{workspace.command-xhyhajxa.js → workspace.command-aczjxzbf.js} +64 -66
  132. package/capacitorApp-mr81qdxq.js +0 -61
  133. package/dependencyScanner-f6grrep3.js +0 -9
  134. package/getDirname-m9s0cmhq.js +0 -8
  135. package/index-mxvakhsm.js +0 -66
  136. package/index-r24hmh0q.js +0 -4
  137. package/recipeScanner-tghkzrrt.js +0 -12
  138. package/typeChecker-kravn7ns.js +0 -8
  139. /package/{index-0wae5ebk.js → index-meh558jy.js} +0 -0
  140. /package/{index-ss469dec.js → index-nz8prx9g.js} +0 -0
@@ -1,4 +1,8 @@
1
1
  // @bun
2
+ import {
3
+ FileSys
4
+ } from "./index-q0y2jq9j.js";
5
+
2
6
  // pkgs/@akanjs/devkit/frontendBuild/clientEntryDiscovery.ts
3
7
  import path3 from "path";
4
8
 
@@ -349,7 +353,7 @@ var resolveNodePackageExport = async (workspaceRoot, specifier) => {
349
353
  const subpath = specifier === packageName ? "." : `.${specifier.slice(packageName.length)}`;
350
354
  const exported = resolvePackageExport(pkgJson.exports, subpath);
351
355
  const rel = exported ?? (subpath === "." ? pkgJson.module ?? pkgJson.main ?? "index.js" : null);
352
- if (!rel || !rel.startsWith("."))
356
+ if (!rel?.startsWith("."))
353
357
  return null;
354
358
  const entryFile = await resolveFileCandidate(path2.resolve(pkgDir, rel));
355
359
  if (!entryFile)
@@ -849,6 +853,7 @@ class ClientEntriesBundler {
849
853
  #externalSubpaths;
850
854
  #externalAliases;
851
855
  #command;
856
+ #target;
852
857
  #outputSubdir;
853
858
  #reactFastRefresh;
854
859
  #artifactDir;
@@ -870,6 +875,7 @@ class ClientEntriesBundler {
870
875
  this.#externalSubpaths = options.externalSubpaths ?? [];
871
876
  this.#externalAliases = options.externalAliases ?? {};
872
877
  this.#command = options.command ?? "start";
878
+ this.#target = options.target ?? "browser";
873
879
  this.#outputSubdir = options.outputSubdir ?? "client";
874
880
  this.#reactFastRefresh = options.reactFastRefresh ?? false;
875
881
  this.#artifactDir = `${this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath}/.akan/artifact`;
@@ -883,7 +889,7 @@ class ClientEntriesBundler {
883
889
  entrypoints: this.#opaqueEntries.entries,
884
890
  outdir: this.#outdir,
885
891
  splitting: true,
886
- target: "browser",
892
+ target: this.#target,
887
893
  format: "esm",
888
894
  naming: CLIENT_BUNDLE_NAMING,
889
895
  metafile: true,
@@ -1117,7 +1123,8 @@ var VENDOR_SPECIFIERS = [
1117
1123
  "akanjs/store",
1118
1124
  "akanjs/base",
1119
1125
  "akanjs/common",
1120
- "akanjs/constant"
1126
+ "akanjs/constant",
1127
+ "akanjs/fetch"
1121
1128
  ];
1122
1129
 
1123
1130
  // pkgs/@akanjs/devkit/frontendBuild/routeClientBuilder.ts
@@ -1226,12 +1233,11 @@ class RouteClientBuilder {
1226
1233
  }).bundle();
1227
1234
  }
1228
1235
  async#buildSsrBundle(bootstrapEntries) {
1229
- const externalOptions = RouteClientBuilder.resolveSsrClientExternalOptions(this.#command);
1230
1236
  return new ClientEntriesBundler({
1231
1237
  app: this.#app,
1232
1238
  entries: bootstrapEntries.buildEntries,
1233
1239
  plugins: [await createBarrelImportsPlugin(this.#app)],
1234
- ...externalOptions,
1240
+ ...RouteClientBuilder.resolveSsrClientBundleOptions(this.#command),
1235
1241
  outputSubdir: "client-ssr",
1236
1242
  command: this.#command
1237
1243
  }).bundle();
@@ -1293,15 +1299,16 @@ ${defaultNames.map((name) => `export default ${name};`).join(`
1293
1299
  const serverEntry = RouteClientBuilder.resolveAkanServerEntry();
1294
1300
  return { [Bun.resolveSync("akanjs/fetch", serverEntry)]: "akanjs/fetch" };
1295
1301
  }
1296
- static resolveSsrClientExternalOptions(command) {
1302
+ static resolveSsrClientBundleOptions(command) {
1297
1303
  if (command === "start") {
1298
1304
  return {
1305
+ target: "bun",
1299
1306
  external: SSR_CLIENT_EXTERNALS,
1300
1307
  externalSubpaths: ["akanjs/fetch"],
1301
1308
  externalAliases: RouteClientBuilder.resolveSsrClientRuntimeAliases()
1302
1309
  };
1303
1310
  }
1304
- return { external: SSR_CLIENT_ALIAS_EXTERNALS };
1311
+ return { target: "bun", external: SSR_CLIENT_ALIAS_EXTERNALS };
1305
1312
  }
1306
1313
  static resolveAkanServerEntry() {
1307
1314
  try {
@@ -1337,7 +1344,7 @@ ${defaultNames.map((name) => `export default ${name};`).join(`
1337
1344
  }
1338
1345
 
1339
1346
  // pkgs/@akanjs/devkit/frontendBuild/autoImportSync.ts
1340
- import { readdir, readFile, stat, writeFile } from "fs/promises";
1347
+ import { readdir, readFile, stat } from "fs/promises";
1341
1348
  import path7 from "path";
1342
1349
  import ts2 from "typescript";
1343
1350
  var TEST_FILE_RE = /\.(test|spec)\.(ts|tsx)$/;
@@ -1515,6 +1522,8 @@ class AutoImportSync {
1515
1522
  const [scope, project, facet] = parts;
1516
1523
  if (scope !== "apps" && scope !== "libs" || !project || !facet)
1517
1524
  return null;
1525
+ if (facet === "lib" && parts[3] === "__lib")
1526
+ return null;
1518
1527
  const role = roleFor(facet, base);
1519
1528
  if (!role)
1520
1529
  return null;
@@ -1529,7 +1538,7 @@ class AutoImportSync {
1529
1538
  const next = transformSource(source, abs, ctx, resolveExtra);
1530
1539
  if (next === null || next === source)
1531
1540
  return false;
1532
- await writeFile(abs, next);
1541
+ await FileSys.writeTextAtomic(abs, next);
1533
1542
  return true;
1534
1543
  }
1535
1544
  async#extraResolverFor(abs, ctx) {
@@ -2010,7 +2019,7 @@ class DevChangePlanner {
2010
2019
  var uniqueResolved = (files) => [...new Set(files.map((file) => path8.resolve(file)))].sort();
2011
2020
 
2012
2021
  // pkgs/@akanjs/devkit/frontendBuild/devGeneratedIndexSync.ts
2013
- import { mkdir as mkdir2, readdir as readdir2, readFile as readFile2, rm, stat as stat2, writeFile as writeFile2 } from "fs/promises";
2022
+ import { mkdir as mkdir2, readdir as readdir2, readFile as readFile2, rm, stat as stat2 } from "fs/promises";
2014
2023
  import path9 from "path";
2015
2024
  var BARREL_FACETS2 = new Set(["common", "srvkit", "ui", "webkit", "plugin"]);
2016
2025
  var FACET_SOURCE_FILE_RE = /\.(ts|tsx)$/;
@@ -2102,7 +2111,7 @@ class DevGeneratedIndexSync {
2102
2111
  if (current === content)
2103
2112
  return false;
2104
2113
  await mkdir2(dir, { recursive: true });
2105
- await writeFile2(indexPath, content);
2114
+ await FileSys.writeTextAtomic(indexPath, content);
2106
2115
  return true;
2107
2116
  }
2108
2117
  async#contentForIndex(indexPath) {
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-etwh7sd3.js";
5
+ } from "./index-mak3cd28.js";
6
6
  import {
7
- PkgExecutor
8
- } from "./index-yzsxc30b.js";
7
+ FileSys
8
+ } from "./index-q0y2jq9j.js";
9
9
  import {
10
- TypeScriptDependencyScanner
11
- } from "./index-46tjzh6s.js";
10
+ PkgExecutor
11
+ } from "./index-2tv3fdx4.js";
12
12
  import {
13
- FileSys
14
- } from "./index-67546d0j.js";
13
+ TypeScriptDependencyScanner2
14
+ } from "./index-kcxmv48c.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/package/package.runner.ts
17
17
  import path2 from "path";
@@ -140,7 +140,7 @@ class PackageRunner extends runner("package") {
140
140
  await workspace.setPkgTsPaths(pkgName);
141
141
  }
142
142
  async removePackage(pkg) {
143
- await pkg.workspace.exec(`rm -rf pkgs/${pkg.name}`);
143
+ await pkg.workspace.removeDir(`pkgs/${pkg.name}`);
144
144
  await pkg.workspace.unsetPkgTsPaths(pkg.name);
145
145
  }
146
146
  async scanSync(pkg) {
@@ -150,7 +150,7 @@ class PackageRunner extends runner("package") {
150
150
  async buildPackage(pkg) {
151
151
  await $`rm -rf ${pkg.dist.cwdPath}`;
152
152
  await pkg.dist.mkdir(pkg.dist.cwdPath);
153
- const scanner = await TypeScriptDependencyScanner.from(pkg);
153
+ const scanner = await TypeScriptDependencyScanner2.from(pkg);
154
154
  const { npmDeps, npmDevDeps, missingDeps } = await scanner.getPackageBuildDependencies(pkg.name);
155
155
  const packageRuntimeDependencies = {
156
156
  "@akanjs/devkit": ["tailwind-scrollbar"]
@@ -163,13 +163,17 @@ class PackageRunner extends runner("package") {
163
163
  "tailwind-scrollbar"
164
164
  ].filter((dep) => dep !== "akanjs" && dep !== "@akanjs/devkit");
165
165
  }
166
- const bundledRuntimeDeps = new Set(pkg.name === "@akanjs/cli" ? ["@akanjs/devkit"] : []);
166
+ const packageBundledRuntimeDependencies = {
167
+ "@akanjs/cli": ["@akanjs/devkit"],
168
+ akanjs: ["use-agentic"]
169
+ };
170
+ const bundledRuntimeDeps = new Set(packageBundledRuntimeDependencies[pkg.name] ?? []);
167
171
  const forcedRuntimeDeps = packageRuntimeDependencies[pkg.name] ?? [];
168
172
  const forcedRuntimeDevDeps = packageRuntimeDevDependencies[pkg.name] ?? [];
169
173
  const [rootPackageJson, pkgJson] = await Promise.all([pkg.workspace.getPackageJson(), pkg.getPackageJson()]);
170
174
  const optionalPeerDeps = new Set(Object.entries(pkgJson.peerDependenciesMeta ?? {}).filter(([, meta]) => meta.optional).map(([dep]) => dep));
171
175
  const packageRuntimeDeps = [...new Set([...npmDeps, ...forcedRuntimeDeps])].filter((dep) => !optionalPeerDeps.has(dep) && !bundledRuntimeDeps.has(dep));
172
- const packageRuntimeDevDeps = [...new Set([...npmDevDeps, ...forcedRuntimeDevDeps])].filter((dep) => !optionalPeerDeps.has(dep));
176
+ const packageRuntimeDevDeps = [...new Set([...npmDevDeps, ...forcedRuntimeDevDeps])].filter((dep) => !optionalPeerDeps.has(dep) && !bundledRuntimeDeps.has(dep));
173
177
  const rootDeps = { ...rootPackageJson.dependencies, ...rootPackageJson.devDependencies };
174
178
  const missingForcedDeps = forcedRuntimeDeps.filter((dep) => !rootDeps[dep]);
175
179
  const missingForcedDevDeps = forcedRuntimeDevDeps.filter((dep) => !rootDeps[dep]);
@@ -268,7 +272,7 @@ class PackageRunner extends runner("package") {
268
272
  }
269
273
  if (!pkgJson.version)
270
274
  throw new Error(`[package] dist package version is missing for ${pkg.name}`);
271
- if (!pkgJson.publishConfig || pkgJson.publishConfig.access !== "public") {
275
+ if (pkgJson.publishConfig?.access !== "public") {
272
276
  throw new Error(`[package] ${pkg.name} must publish with publishConfig.access=public`);
273
277
  }
274
278
  if (!await Bun.file(`${pkg.dist.cwdPath}/README.md`).exists()) {
@@ -1,11 +1,11 @@
1
1
  // @bun
2
+ import {
3
+ CommandExecutionError
4
+ } from "./index-2tv3fdx4.js";
2
5
  import {
3
6
  resolveMobilePath,
4
7
  targetHtmlFilename
5
- } from "./index-76rn3g2c.js";
6
- import {
7
- CommandExecutionError
8
- } from "./index-yzsxc30b.js";
8
+ } from "./index-47pj3aee.js";
9
9
 
10
10
  // pkgs/@akanjs/devkit/capacitorApp.ts
11
11
  import { cp, mkdir, readFile, rm, writeFile } from "fs/promises";
@@ -17,22 +17,22 @@ import { capitalize } from "akanjs/common";
17
17
 
18
18
  // pkgs/@akanjs/devkit/fileEditor.ts
19
19
  class FileEditor {
20
- filePath;
21
- content;
20
+ #filePath;
21
+ #content;
22
22
  constructor(filePath, content) {
23
- this.filePath = filePath;
24
- this.content = content;
23
+ this.#filePath = filePath;
24
+ this.#content = content;
25
25
  }
26
26
  static async create(filePath) {
27
27
  try {
28
28
  const content = await Bun.file(filePath).text();
29
29
  return new FileEditor(filePath, content);
30
- } catch (error) {
30
+ } catch (_error) {
31
31
  throw new Error(`Failed to read file: ${filePath}`);
32
32
  }
33
33
  }
34
34
  find(pattern) {
35
- const lines = this.content.split(`
35
+ const lines = this.#content.split(`
36
36
  `);
37
37
  const regex = typeof pattern === "string" ? new RegExp(pattern) : pattern;
38
38
  for (let i = 0;i < lines.length; i++) {
@@ -45,7 +45,7 @@ class FileEditor {
45
45
  return -1;
46
46
  }
47
47
  findAll(pattern) {
48
- const lines = this.content.split(`
48
+ const lines = this.#content.split(`
49
49
  `);
50
50
  const regex = typeof pattern === "string" ? new RegExp(pattern) : pattern;
51
51
  const matches = [];
@@ -63,10 +63,10 @@ class FileEditor {
63
63
  if (lineIndex === -1) {
64
64
  throw new Error(`Pattern not found: ${pattern}`);
65
65
  }
66
- const lines = this.content.split(`
66
+ const lines = this.#content.split(`
67
67
  `);
68
68
  lines.splice(lineIndex + 1, 0, data);
69
- this.content = lines.join(`
69
+ this.#content = lines.join(`
70
70
  `);
71
71
  return this;
72
72
  }
@@ -75,40 +75,40 @@ class FileEditor {
75
75
  if (lineIndex === -1) {
76
76
  throw new Error(`Pattern not found: ${pattern}`);
77
77
  }
78
- const lines = this.content.split(`
78
+ const lines = this.#content.split(`
79
79
  `);
80
80
  lines.splice(lineIndex, 0, data);
81
- this.content = lines.join(`
81
+ this.#content = lines.join(`
82
82
  `);
83
83
  return this;
84
84
  }
85
85
  replace(pattern, replacement) {
86
86
  const regex = typeof pattern === "string" ? new RegExp(pattern, "g") : pattern;
87
- this.content = this.content.replace(regex, replacement);
87
+ this.#content = this.#content.replace(regex, replacement);
88
88
  return this;
89
89
  }
90
90
  append(data) {
91
- this.content += `
91
+ this.#content += `
92
92
  ${data}`;
93
93
  return this;
94
94
  }
95
95
  prepend(data) {
96
- this.content = `${data}
97
- ${this.content}`;
96
+ this.#content = `${data}
97
+ ${this.#content}`;
98
98
  return this;
99
99
  }
100
100
  async save() {
101
101
  try {
102
- await Bun.write(this.filePath, this.content);
103
- } catch (error) {
104
- throw new Error(`Failed to save file: ${this.filePath}`);
102
+ await Bun.write(this.#filePath, this.#content);
103
+ } catch (_error) {
104
+ throw new Error(`Failed to save file: ${this.#filePath}`);
105
105
  }
106
106
  }
107
107
  getContent() {
108
- return this.content;
108
+ return this.#content;
109
109
  }
110
110
  setContent(content) {
111
- this.content = content;
111
+ this.#content = content;
112
112
  return this;
113
113
  }
114
114
  }
@@ -474,7 +474,7 @@ var PLACEHOLDER_APP_IDS = [
474
474
  "com.example.myapp"
475
475
  ];
476
476
  var placeholderAppIdSegment = /^(example|examples|myorg|myapp|mycompany|myorganization|changeme|todo|sample|test)$/;
477
- var isPlaceholderAppId = (appId) => {
477
+ var isPlaceholderAppId2 = (appId) => {
478
478
  const normalized = appId?.trim().toLowerCase() ?? "";
479
479
  if (!normalized)
480
480
  return true;
@@ -641,7 +641,7 @@ function materializeCapacitorConfig(target, { operation, localServerUrl, localIp
641
641
  return config;
642
642
  }
643
643
 
644
- class CapacitorApp {
644
+ class CapacitorApp2 {
645
645
  app;
646
646
  target;
647
647
  project;
@@ -1513,4 +1513,4 @@ ${filter}$1`);
1513
1513
  }
1514
1514
  }
1515
1515
 
1516
- export { SWIFTUICORE_MIN_IOS_MAJOR, rootCapacitorConfigFilenames, rootCapacitorConfigPaths, clearRootCapacitorConfigs, writeRootCapacitorConfig, selectLocalDevHost, parseIosRuntimeMajor, sortIosRunTargets, parseDevicectlDevices, parseSimctlDevices, buildIosNativeRunCommand, classifyIosRunFailure, formatIosRunFailureMessage, sanitizeIosNativeRunEnv, PLACEHOLDER_APP_IDS, isPlaceholderAppId, getMissingAndroidReleaseSigningKeys, formatAndroidReleaseSigningError, getAdbDeviceStateIssues, getAndroidLocalServerHost, ANDROID_MIN_SDK_VERSION, raiseGradleMinSdkVersion, assertJsonSerializable, materializeCapacitorConfig, CapacitorApp };
1516
+ export { isPlaceholderAppId2, CapacitorApp2 };
package/index.js CHANGED
@@ -1,39 +1,36 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
3
  import {
4
- getTargetCommandNames,
5
4
  getTargetMetas,
5
+ getTargetCommandNames,
6
6
  runCommands
7
- } from "./index-etwh7sd3.js";
8
- import"./index-yzsxc30b.js";
9
- import"./index-mxvakhsm.js";
10
- import"./index-1577bej2.js";
11
- import"./index-67546d0j.js";
12
- import {
13
- __require
14
- } from "./index-r24hmh0q.js";
7
+ } from "./index-mak3cd28.js";
8
+ import"./index-q0y2jq9j.js";
9
+ import"./index-2tv3fdx4.js";
10
+ import"./index-6wwzs1bc.js";
15
11
 
16
12
  // pkgs/@akanjs/cli/commandManifest.ts
17
13
  import path from "path";
18
14
 
19
15
  // pkgs/@akanjs/cli/commandModules.ts
20
16
  var commandModules = {
21
- workspace: async () => (await import("./workspace.command-xhyhajxa.js")).WorkspaceCommand,
22
- agent: async () => (await import("./agent.command-a3n15c6t.js")).AgentCommand,
23
- application: async () => (await import("./application.command-rdm3et0g.js")).ApplicationCommand,
24
- library: async () => (await import("./library.command-x6t29a30.js")).LibraryCommand,
25
- localRegistry: async () => (await import("./localRegistry.command-649g1n7b.js")).LocalRegistryCommand,
26
- package: async () => (await import("./package.command-zgy7f3fz.js")).PackageCommand,
27
- module: async () => (await import("./module.command-8w8ys5t3.js")).ModuleCommand,
28
- page: async () => (await import("./page.command-yjmnkyk2.js")).PageCommand,
29
- context: async () => (await import("./context.command-ysxawe7h.js")).ContextCommand,
30
- cloud: async () => (await import("./cloud.command-56aeekqn.js")).CloudCommand,
31
- guideline: async () => (await import("./guideline.command-yqf9a372.js")).GuidelineCommand,
32
- scalar: async () => (await import("./scalar.command-9dhmqhtm.js")).ScalarCommand,
33
- primitive: async () => (await import("./primitive.command-gfqaagsg.js")).PrimitiveCommand,
34
- quality: async () => (await import("./quality.command-ec8r1dn3.js")).QualityCommand,
35
- repair: async () => (await import("./repair.command-p9ey6mkm.js")).RepairCommand,
36
- workflow: async () => (await import("./workflow.command-ycwc6zr6.js")).WorkflowCommand
17
+ workspace: async () => (await import("./workspace.command-aczjxzbf.js")).WorkspaceCommand,
18
+ agent: async () => (await import("./agent.command-d2gfxfck.js")).AgentCommand,
19
+ application: async () => (await import("./application.command-pj2m7584.js")).ApplicationCommand,
20
+ library: async () => (await import("./library.command-nbsky672.js")).LibraryCommand,
21
+ localRegistry: async () => (await import("./localRegistry.command-ts6t5e5a.js")).LocalRegistryCommand,
22
+ package: async () => (await import("./package.command-axv0abmn.js")).PackageCommand,
23
+ module: async () => (await import("./module.command-29vqzrh8.js")).ModuleCommand,
24
+ page: async () => (await import("./page.command-vs9s3zrh.js")).PageCommand,
25
+ context: async () => (await import("./context.command-ez8a0zyz.js")).ContextCommand,
26
+ cloud: async () => (await import("./cloud.command-gxqp8xdv.js")).CloudCommand,
27
+ subspace: async () => (await import("./subspace.command-35a3t6vv.js")).SubspaceCommand,
28
+ guideline: async () => (await import("./guideline.command-xmqwx8zm.js")).GuidelineCommand,
29
+ scalar: async () => (await import("./scalar.command-6k1vhe9s.js")).ScalarCommand,
30
+ primitive: async () => (await import("./primitive.command-cbxmqbtc.js")).PrimitiveCommand,
31
+ quality: async () => (await import("./quality.command-gmbs7nws.js")).QualityCommand,
32
+ repair: async () => (await import("./repair.command-bqsjptsj.js")).RepairCommand,
33
+ workflow: async () => (await import("./workflow.command-nwpcdc8p.js")).WorkflowCommand
37
34
  };
38
35
  var commandModuleIds = Object.keys(commandModules);
39
36
 
@@ -1,17 +1,15 @@
1
1
  // @bun
2
- import {
3
- LibraryScript
4
- } from "./index-8pd02prk.js";
5
2
  import {
6
3
  Lib,
7
4
  Workspace,
8
5
  command
9
- } from "./index-etwh7sd3.js";
10
- import"./index-yzsxc30b.js";
11
- import"./index-mxvakhsm.js";
12
- import"./index-1577bej2.js";
13
- import"./index-67546d0j.js";
14
- import"./index-r24hmh0q.js";
6
+ } from "./index-mak3cd28.js";
7
+ import"./index-q0y2jq9j.js";
8
+ import"./index-2tv3fdx4.js";
9
+ import"./index-6wwzs1bc.js";
10
+ import {
11
+ LibraryScript
12
+ } from "./index-259dsnz3.js";
15
13
 
16
14
  // pkgs/@akanjs/cli/library/library.command.ts
17
15
  class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
@@ -24,7 +22,10 @@ class LibraryCommand extends command("library", [LibraryScript], ({ public: targ
24
22
  syncLibrary: target({ desc: "Sync dependencies and configuration for a library" }).with(Lib).exec(async function(lib) {
25
23
  await this.libraryScript.syncLibrary(lib);
26
24
  }),
27
- installLibrary: target({ desc: "Install pre-built library templates (shared, util, etc.)" }).arg("libName", String, { desc: "name of library", nullable: true }).with(Workspace).exec(async function(libName, workspace) {
25
+ libraryStatus: target({ desc: "Report whether each library still matches the source it was installed from" }).with(Workspace).option("format", String, { desc: "output format", default: "text", enum: ["text", "json"] }).exec(async function(workspace, format) {
26
+ await this.libraryScript.libraryStatus(workspace, format);
27
+ }),
28
+ installLibrary: target({ desc: "Install pre-built library templates (shared, util, etc.)" }).arg("libName", String, { desc: "name of library" }).with(Workspace).exec(async function(libName, workspace) {
28
29
  await this.libraryScript.installLibrary(workspace, libName);
29
30
  })
30
31
  })) {
@@ -1,33 +1,30 @@
1
1
  // @bun
2
2
  import {
3
- CloudRunner,
4
- getNpmRegistryUrl
5
- } from "./index-nwqqssnb.js";
3
+ Workspace,
4
+ runner,
5
+ script,
6
+ command
7
+ } from "./index-mak3cd28.js";
8
+ import"./index-q0y2jq9j.js";
6
9
  import {
7
- PackageScript
8
- } from "./index-h5whaj26.js";
9
- import"./index-0cj2zxbm.js";
10
+ PkgExecutor
11
+ } from "./index-2tv3fdx4.js";
12
+ import"./index-6wwzs1bc.js";
10
13
  import {
11
14
  ApplicationScript
12
- } from "./index-bzznxgcx.js";
13
- import"./index-8pd02prk.js";
14
- import"./index-76rn3g2c.js";
15
+ } from "./index-v0qh106m.js";
16
+ import"./index-259dsnz3.js";
17
+ import"./index-hwkygn9s.js";
18
+ import"./index-kn1h7p1x.js";
15
19
  import {
16
- Workspace,
17
- command,
18
- runner,
19
- script
20
- } from "./index-etwh7sd3.js";
21
- import"./index-fgc8r6dj.js";
22
- import"./index-bjpxzr6s.js";
20
+ getNpmRegistryUrl,
21
+ CloudRunner
22
+ } from "./index-aj7tyh5w.js";
23
+ import"./index-kcxmv48c.js";
23
24
  import {
24
- PkgExecutor
25
- } from "./index-yzsxc30b.js";
26
- import"./index-mxvakhsm.js";
27
- import"./index-1577bej2.js";
28
- import"./index-46tjzh6s.js";
29
- import"./index-67546d0j.js";
30
- import"./index-r24hmh0q.js";
25
+ PackageScript
26
+ } from "./index-ws5e0j51.js";
27
+ import"./index-j9yhg404.js";
31
28
 
32
29
  // pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
33
30
  import { mkdir, rm } from "fs/promises";
@@ -1,24 +1,21 @@
1
1
  // @bun
2
2
  import {
3
- ModuleScript
4
- } from "./index-mewacxye.js";
5
- import"./index-ss469dec.js";
6
- import"./index-65aeh789.js";
7
- import"./index-0cj2zxbm.js";
3
+ Sys,
4
+ Module,
5
+ command
6
+ } from "./index-mak3cd28.js";
7
+ import"./index-q0y2jq9j.js";
8
+ import"./index-2tv3fdx4.js";
9
+ import"./index-6wwzs1bc.js";
8
10
  import {
9
11
  renderPrimitiveReport
10
- } from "./index-kcsa1zff.js";
11
- import"./index-j37qq1f2.js";
12
+ } from "./index-gyd220p2.js";
13
+ import"./index-kn1h7p1x.js";
12
14
  import {
13
- Module,
14
- Sys,
15
- command
16
- } from "./index-etwh7sd3.js";
17
- import"./index-yzsxc30b.js";
18
- import"./index-mxvakhsm.js";
19
- import"./index-1577bej2.js";
20
- import"./index-67546d0j.js";
21
- import"./index-r24hmh0q.js";
15
+ ModuleScript
16
+ } from "./index-8pm30m73.js";
17
+ import"./index-pnqbkf5p.js";
18
+ import"./index-h7yw2z9n.js";
22
19
 
23
20
  // pkgs/@akanjs/cli/module/module.command.ts
24
21
  import { Logger, lowerlize } from "akanjs/common";
@@ -1,18 +1,16 @@
1
1
  // @bun
2
- import {
3
- PackageScript
4
- } from "./index-h5whaj26.js";
5
2
  import {
6
3
  Pkg,
7
4
  Workspace,
8
5
  command
9
- } from "./index-etwh7sd3.js";
10
- import"./index-yzsxc30b.js";
11
- import"./index-mxvakhsm.js";
12
- import"./index-1577bej2.js";
13
- import"./index-46tjzh6s.js";
14
- import"./index-67546d0j.js";
15
- import"./index-r24hmh0q.js";
6
+ } from "./index-mak3cd28.js";
7
+ import"./index-q0y2jq9j.js";
8
+ import"./index-2tv3fdx4.js";
9
+ import"./index-6wwzs1bc.js";
10
+ import"./index-kcxmv48c.js";
11
+ import {
12
+ PackageScript
13
+ } from "./index-ws5e0j51.js";
16
14
 
17
15
  // pkgs/@akanjs/cli/package/package.command.ts
18
16
  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-alpha.11",
3
+ "version": "3.0.0-alpha.110",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -14,11 +14,10 @@
14
14
  "directory": "pkgs/@akanjs/cli"
15
15
  },
16
16
  "engines": {
17
- "bun": ">=1.3.13"
17
+ "bun": ">=1.4.0"
18
18
  },
19
19
  "bin": {
20
- "akan": "./index.js",
21
- "akan2": "./index.js"
20
+ "akan": "./index.js"
22
21
  },
23
22
  "exports": {
24
23
  ".": {
@@ -34,7 +33,7 @@
34
33
  "@langchain/openai": "^1.4.6",
35
34
  "@tailwindcss/node": "^4.3.0",
36
35
  "@trapezedev/project": "^7.1.4",
37
- "akanjs": "3.0.0-alpha.11",
36
+ "akanjs": "3.0.0-alpha.110",
38
37
  "chalk": "^5.6.2",
39
38
  "commander": "^14.0.3",
40
39
  "dayjs": "^1.11.20",
@@ -42,7 +41,6 @@
42
41
  "fonteditor-core": "^2.6.3",
43
42
  "ignore": "^7.0.5",
44
43
  "ink": "^6.8.0",
45
- "js-yaml": "^4.1.1",
46
44
  "ora": "^9.4.0",
47
45
  "qrcode": "^1.5.4",
48
46
  "react": "19.2.7",
@@ -56,4 +54,4 @@
56
54
  "bun": {
57
55
  "platform": "bun"
58
56
  }
59
- }
57
+ }
@@ -1,17 +1,15 @@
1
1
  // @bun
2
- import {
3
- PageScript
4
- } from "./index-65aeh789.js";
5
2
  import {
6
3
  App,
7
4
  Module,
8
5
  command
9
- } from "./index-etwh7sd3.js";
10
- import"./index-yzsxc30b.js";
11
- import"./index-mxvakhsm.js";
12
- import"./index-1577bej2.js";
13
- import"./index-67546d0j.js";
14
- import"./index-r24hmh0q.js";
6
+ } from "./index-mak3cd28.js";
7
+ import"./index-q0y2jq9j.js";
8
+ import"./index-2tv3fdx4.js";
9
+ import"./index-6wwzs1bc.js";
10
+ import {
11
+ PageScript
12
+ } from "./index-pnqbkf5p.js";
15
13
 
16
14
  // pkgs/@akanjs/cli/page/page.command.ts
17
15
  class PageCommand extends command("page", [PageScript], ({ public: target }) => ({