@akanjs/cli 3.3.0-rc.1 → 3.3.0-rc.2

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 (91) hide show
  1. package/.build-stamp +2 -2
  2. package/CodeAgent-xdw73nbz.js +11 -0
  3. package/{CodeTui-zee8atsr.js → CodeTui-0gewm71c.js} +4 -4
  4. package/TunnelShare-cccfdgbm.js +16 -0
  5. package/{agent.command-x65f2ags.js → agent.command-g1mj34wz.js} +20 -22
  6. package/akanCode.js +5 -5
  7. package/appExecutor-rrx10jya.js +11 -0
  8. package/{application.command-azbd1pb2.js → application.command-3w4v7t40.js} +17 -19
  9. package/{applicationBuildRunner-trfxv3pd.js → applicationBuildRunner-y5xbetyz.js} +12 -12
  10. package/buildBatch.proc.js +19 -18
  11. package/{cloud.command-gapp4634.js → cloud.command-ph0rz6sw.js} +19 -24
  12. package/cloud.script-8bs9tp4j.js +30 -0
  13. package/{code.command-5smx61yf.js → code.command-9b967qpg.js} +13 -13
  14. package/{context.command-ym5jbkny.js → context.command-ndzs5rbf.js} +20 -22
  15. package/context.runner-bmstpng2.js +32 -0
  16. package/csrArtifactBuilder-gtvff6k7.js +10 -0
  17. package/{index-2ny1e95c.js → dependencyScanner-93g8tk0r.js} +6 -5
  18. package/{fileSys-q22646yc.js → fileSys-e5mwt73x.js} +1 -1
  19. package/frameworkGraph-aneq2nwy.js +8 -0
  20. package/{guideline.command-zwypaqsh.js → guideline.command-y8qz9kxy.js} +8 -8
  21. package/incrementalBuilder.proc.js +24 -18
  22. package/{index-8jtqfye2.js → index-02v45hh9.js} +6 -6
  23. package/{index-2jmvfa62.js → index-0csk6jqm.js} +3 -3
  24. package/{index-nc3br31y.js → index-0wa5z6rm.js} +2 -2
  25. package/{index-9wh04mqy.js → index-0z8sbdme.js} +2 -2
  26. package/{index-zmd9xxgd.js → index-1c2807kg.js} +3 -3
  27. package/{index-4ss4gkv3.js → index-1p9bxjmt.js} +2 -2
  28. package/{index-612fdtbk.js → index-2kh4xj3m.js} +1 -1
  29. package/{index-kfvjzk8r.js → index-2vn0m9z5.js} +3 -3
  30. package/{index-xwwex8rf.js → index-3569fr49.js} +5 -5
  31. package/{index-a860mx0m.js → index-38x8ynrx.js} +24 -24
  32. package/{index-p7beqww9.js → index-3fmzz9sf.js} +18 -18
  33. package/{index-s885g0jj.js → index-45aprybg.js} +3 -3
  34. package/{index-v7ajmsh3.js → index-4a1n0nym.js} +1 -1
  35. package/{index-ybcb9wc8.js → index-4zgm54wf.js} +9 -9
  36. package/{index-2yn3r67f.js → index-652f3bs8.js} +6 -6
  37. package/{index-j6jjmn2r.js → index-6gepp8yn.js} +10 -10
  38. package/{index-dmcpetwe.js → index-6j351de4.js} +98 -23
  39. package/{index-0dm25wvf.js → index-7ssr7wq4.js} +1 -1
  40. package/{index-k6vwww45.js → index-82cmbpxc.js} +7 -7
  41. package/{index-j592zfqc.js → index-9rymt8d6.js} +1 -1
  42. package/{index-275a4r3n.js → index-ankyx6dj.js} +11 -15
  43. package/{index-41a03gkj.js → index-b0t92k71.js} +19 -19
  44. package/{index-z92zm3wd.js → index-b372rck5.js} +17 -6
  45. package/{index-78y75t0a.js → index-cm9rb480.js} +6 -6
  46. package/{index-z96ks033.js → index-d0n78fzc.js} +153 -45
  47. package/{index-gt8phqpt.js → index-dr1carpr.js} +4 -4
  48. package/{index-zfnz878d.js → index-f2arv0mv.js} +1 -1
  49. package/{index-67sd09ag.js → index-gtydr9qc.js} +8 -8
  50. package/{index-knpm8sdm.js → index-j3fqs8rc.js} +1 -1
  51. package/{index-h901f24n.js → index-jdw9m5c4.js} +5 -5
  52. package/{index-dadwp2aw.js → index-jg5rwrf7.js} +49 -22
  53. package/{index-baccvws5.js → index-ktxdfqg5.js} +1 -1
  54. package/{index-w1zexzpx.js → index-mnhrqjjq.js} +1 -1
  55. package/{index-71y6176j.js → index-pc42gxa5.js} +7 -7
  56. package/{index-6dzjer7p.js → index-q8h4eg5y.js} +6 -6
  57. package/{index-j0wr4e32.js → index-qh81drde.js} +9 -9
  58. package/{index-jek2re5k.js → index-scfsqen7.js} +4 -4
  59. package/{index-0s7w2085.js → index-twjgmryg.js} +4 -4
  60. package/{index-7wf8snar.js → index-whvhsb5f.js} +1 -1
  61. package/{index-p5zh7pmc.js → index-xv3pvdw4.js} +1 -1
  62. package/{index-3txdtztz.js → index-y2g0s9tn.js} +1 -1
  63. package/{index-ebn9kgea.js → index-ymgsvhc5.js} +4 -5
  64. package/{index-by2tvsq6.js → index-zyjztrvc.js} +1 -1
  65. package/index.js +30 -28
  66. package/{libExecutor-jc6f8hm6.js → libExecutor-nstr00s7.js} +3 -3
  67. package/{library.command-nxvesvhb.js → library.command-b02aw1hm.js} +8 -8
  68. package/{localRegistry.command-xz62e4ng.js → localRegistry.command-3hg1p4aj.js} +18 -23
  69. package/{module.command-aaws9byg.js → module.command-bd9gz6cv.js} +10 -10
  70. package/{package.command-j7hv26p0.js → package.command-xmr0mxze.js} +9 -12
  71. package/package.json +2 -2
  72. package/{page.command-7yffs7n9.js → page.command-x94qf58g.js} +8 -8
  73. package/{pipeline.command-7yk0zcng.js → pipeline.command-n2843k6t.js} +7 -7
  74. package/{pkgExecutor-arxmvx4t.js → pkgExecutor-cka27e3c.js} +3 -3
  75. package/{primitive.command-7a1pt715.js → primitive.command-cs7v376h.js} +11 -11
  76. package/{projectTypecheck-f4qhbecd.js → projectTypecheck-za2n3nbr.js} +1 -1
  77. package/{prompter-qyggfhqd.js → prompter-d33wmdpa.js} +2 -2
  78. package/{quality.command-c6mvrjh1.js → quality.command-nqngh1jd.js} +9 -9
  79. package/{repair.command-093adzt9.js → repair.command-v2medwsm.js} +10 -10
  80. package/{scalar.command-2ex84spb.js → scalar.command-61cjmxn1.js} +9 -9
  81. package/{subspace.command-4n4n4jpv.js → subspace.command-dtv8nfh7.js} +11 -13
  82. package/{tunnel.command-f7ep1qfa.js → tunnel.command-fmwm5fgb.js} +10 -12
  83. package/{verify.command-zrkxnvct.js → verify.command-4f260t53.js} +15 -17
  84. package/{workflow.command-ks16jegk.js → workflow.command-tm5q9xsm.js} +15 -15
  85. package/{workspace.command-ahhfpaag.js → workspace.command-75gc280j.js} +34 -38
  86. package/CodeAgent-fx6088tv.js +0 -11
  87. package/TunnelShare-9ry4vh0y.js +0 -18
  88. package/appExecutor-79azsb2w.js +0 -11
  89. package/cloud.script-3b401efv.js +0 -35
  90. package/context.runner-kctbfsde.js +0 -34
  91. package/dependencyScanner-ge10gb52.js +0 -8
@@ -3,7 +3,7 @@ import {
3
3
  ROOT_LAYOUT_SYSTEM,
4
4
  isImplicitRootLayoutKey,
5
5
  resolveSsrPageEntriesForApp
6
- } from "./index-z92zm3wd.js";
6
+ } from "./index-b372rck5.js";
7
7
  import {
8
8
  computeRouteSeedIndex,
9
9
  saveRouteSeedIndex,
@@ -11,11 +11,13 @@ import {
11
11
  ClientEntriesBundler,
12
12
  VENDOR_SPECIFIERS,
13
13
  RouteClientBuilder
14
- } from "./index-jek2re5k.js";
14
+ } from "./index-scfsqen7.js";
15
15
  import {
16
16
  SOURCE_EXTS,
17
+ buildCacheStamp,
18
+ isBuildCacheStamp,
17
19
  FontOptimizer
18
- } from "./index-dmcpetwe.js";
20
+ } from "./index-6j351de4.js";
19
21
  import {
20
22
  BarrelAnalyzer,
21
23
  createTsconfigPackageResolver,
@@ -23,7 +25,10 @@ import {
23
25
  CsrEntryFiles,
24
26
  toClientReferencePath,
25
27
  PagesBundleBuilder
26
- } from "./index-9wh04mqy.js";
28
+ } from "./index-0z8sbdme.js";
29
+ import {
30
+ FileSys2
31
+ } from "./index-zyjztrvc.js";
27
32
  import {
28
33
  CssBlockParser
29
34
  } from "./index-62md4dwy.js";
@@ -207,14 +212,16 @@ import { stat } from "fs/promises";
207
212
  var CANDIDATE_RE = /-?(?:[\w@]|\[(?:[^[\]\s]|\[[^[\]\s]+\])+\])[\w:/.-]*(?:(?:\[(?:[^[\]\s]|\[[^[\]\s]+\])+\]|\((?:[a-z-]+:)?--[^)\s]+\))[\w:/.-]*)*/g;
208
213
 
209
214
  class CssCandidateCache {
210
- static #version = 5;
215
+ static #version = 6;
211
216
  #path;
217
+ #stamp;
212
218
  #entries = new Map;
213
219
  #dirty = false;
214
220
  #reused = 0;
215
221
  #rescanned = 0;
216
- constructor(cachePath) {
222
+ constructor(cachePath, stamp = buildCacheStamp([import.meta.path])) {
217
223
  this.#path = cachePath;
224
+ this.#stamp = stamp;
218
225
  }
219
226
  get reused() {
220
227
  return this.#reused;
@@ -224,7 +231,7 @@ class CssCandidateCache {
224
231
  }
225
232
  async load() {
226
233
  const raw = await Bun.file(this.#path).json().catch(() => null);
227
- if (!raw || raw.version !== CssCandidateCache.#version || typeof raw.files !== "object")
234
+ if (raw?.version !== CssCandidateCache.#version || !isBuildCacheStamp(raw, this.#stamp) || !raw.files)
228
235
  return this;
229
236
  for (const [file, entry] of Object.entries(raw.files)) {
230
237
  if (typeof entry?.mtimeMs !== "number" || !Array.isArray(entry.candidates))
@@ -250,19 +257,21 @@ class CssCandidateCache {
250
257
  return candidates;
251
258
  }
252
259
  async save(present) {
253
- for (const file of [...this.#entries.keys()]) {
254
- if (present.has(file))
255
- continue;
260
+ const absent = [...this.#entries.keys()].filter((file) => !present.has(file));
261
+ const exists = await Promise.all(absent.map((file) => Bun.file(file).exists()));
262
+ absent.forEach((file, index) => {
263
+ if (exists[index])
264
+ return;
256
265
  this.#entries.delete(file);
257
266
  this.#dirty = true;
258
- }
267
+ });
259
268
  if (!this.#dirty)
260
269
  return;
261
270
  this.#dirty = false;
262
271
  const files = {};
263
272
  for (const [file, entry] of this.#entries)
264
273
  files[file] = entry;
265
- await Bun.write(this.#path, JSON.stringify({ version: CssCandidateCache.#version, files })).catch(() => {
274
+ await FileSys2.writeTextAtomic(this.#path, JSON.stringify({ version: CssCandidateCache.#version, ...this.#stamp, files })).catch(() => {
266
275
  return;
267
276
  });
268
277
  }
@@ -734,6 +743,7 @@ function getPageKeyBasePath(pageKey, basePaths) {
734
743
  return CsrEntryFiles.basePathOfPageKey(pageKey, basePaths);
735
744
  }
736
745
  // pkgs/@akanjs/devkit/frontendBuild/ssrBaseArtifactBuilder.ts
746
+ import { rename } from "fs/promises";
737
747
  import path6 from "path";
738
748
  import { optimize } from "@tailwindcss/node";
739
749
 
@@ -859,13 +869,24 @@ class SsrBaseArtifactBuilder {
859
869
  }
860
870
  async build() {
861
871
  const akanConfig = await this.#app.getConfig();
862
- const { rscClientUrl, rscRuntimeClientManifest, rscRuntimeSsrManifest, vendorMap, runtimeChunks } = await this.#buildRuntimeClientEntries();
863
- const pageKeys = await this.#app.getPageKeys();
864
- this.#app.verbose(`[base-artifact] discovered ${pageKeys.length} route files under ${this.#app.cwdPath}/page`);
865
- const pageEntries = await resolveSsrPageEntriesForApp(this.#app, pageKeys);
866
- const { cssCompiler, optimizedFonts, cssAssets } = await this.#buildStyleAssets();
867
- const dictAssets = await new DictionaryAssetBuilder(this.#app, this.#absArtifactDir).build(akanConfig.i18n);
868
- const pagesBundle = await new PagesBundleBuilder(this.#app, this.#command, pageEntries, this.#serverEnv).build();
872
+ const phaseMs = { runtime: 0, routes: 0, styles: 0, dictionary: 0, pages: 0, total: 0 };
873
+ const timed = async (phase, run) => {
874
+ const started = performance.now();
875
+ try {
876
+ return await run();
877
+ } finally {
878
+ phaseMs[phase] = Math.round(performance.now() - started);
879
+ }
880
+ };
881
+ const { rscClientUrl, rscRuntimeClientManifest, rscRuntimeSsrManifest, vendorMap, runtimeChunks } = await timed("runtime", () => this.#buildRuntimeClientEntries());
882
+ const pageEntries = await timed("routes", async () => {
883
+ const pageKeys = await this.#app.getPageKeys();
884
+ this.#app.verbose(`[base-artifact] discovered ${pageKeys.length} route files under ${this.#app.cwdPath}/page`);
885
+ return await resolveSsrPageEntriesForApp(this.#app, pageKeys);
886
+ });
887
+ const { cssCompiler, optimizedFonts, cssAssets } = await timed("styles", () => this.#buildStyleAssets());
888
+ const dictAssets = await timed("dictionary", () => new DictionaryAssetBuilder(this.#app, this.#absArtifactDir).build(akanConfig.i18n));
889
+ const pagesBundle = await timed("pages", () => new PagesBundleBuilder(this.#app, this.#command, pageEntries, this.#serverEnv).build());
869
890
  this.#app.verbose(`[base-artifact] pages bundle -> ${pagesBundle.bundlePath} (buildId=${pagesBundle.buildId}, splitting=${pagesBundle.splitting}, entry=${pagesBundle.entryBytes} bytes, outputs=${pagesBundle.outputCount}, chunks=${pagesBundle.chunkCount}, total=${pagesBundle.outputBytes} bytes)`);
870
891
  const seedIndex = computeRouteSeedIndex(pageEntries);
871
892
  const seedIndexPath = await saveRouteSeedIndex(this.#absArtifactDir, seedIndex, {
@@ -897,10 +918,16 @@ class SsrBaseArtifactBuilder {
897
918
  androidSha256CertFingerprints: target.android?.sha256CertFingerprints
898
919
  }))
899
920
  };
900
- await Bun.write(path6.join(this.#absArtifactDir, "base-artifact.json"), `${JSON.stringify(artifact, null, 2)}
921
+ await SsrBaseArtifactBuilder.writeArtifact(this.#absArtifactDir, artifact);
922
+ phaseMs.total = Date.now() - this.#started;
923
+ this.#app.verbose(`[base-artifact] complete in ${phaseMs.total}ms`);
924
+ return { artifact, seedIndex, cssCompiler, optimizedFonts, runtimeChunks, phaseMs };
925
+ }
926
+ static async writeArtifact(absArtifactDir, artifact) {
927
+ const artifactPath = path6.join(absArtifactDir, "base-artifact.json");
928
+ await Bun.write(`${artifactPath}.tmp`, `${JSON.stringify(artifact, null, 2)}
901
929
  `);
902
- this.#app.verbose(`[base-artifact] complete in ${Date.now() - this.#started}ms`);
903
- return { artifact, seedIndex, cssCompiler, optimizedFonts, runtimeChunks };
930
+ await rename(`${artifactPath}.tmp`, artifactPath);
904
931
  }
905
932
  async#buildRuntimeClientEntries() {
906
933
  const akanServerPath = await this.#resolveAkanServerPath();
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  JsonFormatter
4
- } from "./index-71y6176j.js";
4
+ } from "./index-pc42gxa5.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/quality/maintainabilityBaseline.ts
7
7
  class MaintainabilityBaseline {
@@ -4,7 +4,7 @@ import {
4
4
  Executor,
5
5
  PkgInfo,
6
6
  WorkspaceExecutor
7
- } from "./index-71y6176j.js";
7
+ } from "./index-pc42gxa5.js";
8
8
 
9
9
  // pkgs/@akanjs/devkit/executors/pkgExecutor.ts
10
10
  import path from "path";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getDirname2,
4
4
  FileSys2
5
- } from "./index-by2tvsq6.js";
5
+ } from "./index-zyjztrvc.js";
6
6
  import {
7
7
  CliError,
8
8
  TypecheckFailure
@@ -216,7 +216,7 @@ var rootEntryHintOf = (type, name) => type === "app" && retiredAppRootEntries.ha
216
216
  var isScannedRootEntry = (type, name) => !name.startsWith(".") || rootAllowedDirs[type].has(name);
217
217
 
218
218
  // pkgs/@akanjs/devkit/workspace/scanInfo.ts
219
- var loadLibExecutor = () => import("./libExecutor-jc6f8hm6.js");
219
+ var loadLibExecutor = () => import("./libExecutor-nstr00s7.js");
220
220
  var serviceFileTypes = [
221
221
  "dictionary",
222
222
  "service",
@@ -242,7 +242,7 @@ var moduleUiFileTypes = {
242
242
  service: new Set(["Util", "Zone"]),
243
243
  scalar: new Set(["Template", "Unit"])
244
244
  };
245
- var createDependencyScanner = async (exec) => (await import("./dependencyScanner-ge10gb52.js")).TypeScriptDependencyScanner.from(exec);
245
+ var createDependencyScanner = async (exec) => (await import("./dependencyScanner-93g8tk0r.js")).TypeScriptDependencyScanner.from(exec);
246
246
  var getScanPath = (exec, relativePath) => path3.posix.join(`${exec.type}s`, exec.name, relativePath.split(path3.sep).join("/"));
247
247
  var getModuleNameFromPath = (kind, modulePath) => {
248
248
  const dirname = path3.basename(modulePath);
@@ -623,9 +623,9 @@ class WorkspaceInfo {
623
623
  return existingWorkspaceInfo;
624
624
  const [appNames, libNames, pkgNames] = await Promise.all([exec.getApps(), exec.getLibs(), exec.getPkgs()]);
625
625
  const [appModule, libModule, pkgModule] = await Promise.all([
626
- import("./appExecutor-79azsb2w.js"),
626
+ import("./appExecutor-rrx10jya.js"),
627
627
  loadLibExecutor(),
628
- import("./pkgExecutor-arxmvx4t.js")
628
+ import("./pkgExecutor-cka27e3c.js")
629
629
  ]);
630
630
  const [appInfos, libInfos, pkgInfos] = await Promise.all([
631
631
  Promise.all(appNames.map(async (appName) => await appModule.AppExecutor.from(exec, appName).scan())),
@@ -1720,7 +1720,7 @@ ${block}`;
1720
1720
  var extractBlockVersion = (content) => content.match(/<!-- akan:agent:version ([^\s]+) -->/)?.[1] ?? null;
1721
1721
  var readDevkitVersion = async () => {
1722
1722
  const { readFile } = await import("fs/promises");
1723
- const { getDirname } = await import("./fileSys-q22646yc.js");
1723
+ const { getDirname } = await import("./fileSys-e5mwt73x.js");
1724
1724
  const dirname = getDirname(import.meta.url);
1725
1725
  for (const candidate of [`${dirname}/package.json`, `${dirname}/../package.json`]) {
1726
1726
  try {
@@ -3388,7 +3388,7 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
3388
3388
  return new AkanAppConfig(app, libs, rootPackageJson, config, baseDevEnv, plugins ?? [], libContributions);
3389
3389
  }
3390
3390
  static async#collectLibContributions(app, libs, bustImportCache) {
3391
- const { LibExecutor } = await import("./libExecutor-jc6f8hm6.js");
3391
+ const { LibExecutor } = await import("./libExecutor-nstr00s7.js");
3392
3392
  const libConfigs = await Promise.all(libs.map(async (libName) => AkanLibConfig.from(LibExecutor.from(app, libName), { bustImportCache }).catch((error) => {
3393
3393
  if (error instanceof LibConfigRefusal)
3394
3394
  throw error;
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-2yn3r67f.js";
4
+ } from "./index-652f3bs8.js";
5
5
  import {
6
6
  AppExecutor2
7
- } from "./index-z92zm3wd.js";
7
+ } from "./index-b372rck5.js";
8
8
  import {
9
9
  LibExecutor2
10
- } from "./index-zfnz878d.js";
10
+ } from "./index-f2arv0mv.js";
11
11
  import {
12
12
  InteractionScaffold,
13
13
  workflowStatus,
@@ -46,16 +46,16 @@ import {
46
46
  nextActionsForTarget,
47
47
  createPrimitiveWriteReport,
48
48
  insertTemplateField
49
- } from "./index-zmd9xxgd.js";
49
+ } from "./index-1c2807kg.js";
50
50
  import {
51
51
  ModuleScript
52
- } from "./index-gt8phqpt.js";
52
+ } from "./index-dr1carpr.js";
53
53
  import {
54
54
  plainNameProblem
55
55
  } from "./index-va90m8nd.js";
56
56
  import {
57
57
  ModuleExecutor
58
- } from "./index-7wf8snar.js";
58
+ } from "./index-whvhsb5f.js";
59
59
 
60
60
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
61
61
  import { capitalize, lowerlize } from "akanjs/common";
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  runner
4
- } from "./index-2yn3r67f.js";
4
+ } from "./index-652f3bs8.js";
5
5
  import {
6
6
  AppExecutor2
7
- } from "./index-z92zm3wd.js";
7
+ } from "./index-b372rck5.js";
8
8
  import {
9
9
  jsonText,
10
10
  workflowStatus,
11
11
  createWorkflowBaselineSummary,
12
12
  buildAkanModuleContextIndex,
13
13
  toolingRolloutGate
14
- } from "./index-zmd9xxgd.js";
14
+ } from "./index-1c2807kg.js";
15
15
  import {
16
16
  buildResourceList,
17
17
  codexMcpConfigPath,
@@ -21,16 +21,16 @@ import {
21
21
  upsertCodexMcpServerBlock,
22
22
  renderDoctorText,
23
23
  AkanContextAnalyzer
24
- } from "./index-h901f24n.js";
24
+ } from "./index-jdw9m5c4.js";
25
25
  import {
26
26
  Prompter2
27
- } from "./index-knpm8sdm.js";
27
+ } from "./index-j3fqs8rc.js";
28
28
  import {
29
29
  NativeApp
30
- } from "./index-ebn9kgea.js";
30
+ } from "./index-ymgsvhc5.js";
31
31
  import {
32
32
  isPlaceholderAppId
33
- } from "./index-612fdtbk.js";
33
+ } from "./index-2kh4xj3m.js";
34
34
  import {
35
35
  getMobileTargets,
36
36
  appIdsOf
@@ -40,10 +40,10 @@ import {
40
40
  } from "./index-xs9a3ddt.js";
41
41
  import {
42
42
  RepairRunner
43
- } from "./index-kfvjzk8r.js";
43
+ } from "./index-2vn0m9z5.js";
44
44
  import {
45
45
  WorkflowRunner
46
- } from "./index-67sd09ag.js";
46
+ } from "./index-gtydr9qc.js";
47
47
 
48
48
  // pkgs/@akanjs/devkit/context/akanMcpContract.ts
49
49
  import { lstatSync, realpathSync } from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  SOURCE_EXTS,
4
4
  WatchRootResolver
5
- } from "./index-dmcpetwe.js";
5
+ } from "./index-6j351de4.js";
6
6
  import {
7
7
  loaderFor,
8
8
  BarrelAnalyzer,
@@ -18,15 +18,15 @@ import {
18
18
  CsrDevPaths,
19
19
  PagesEntrySourceGenerator,
20
20
  PagesBundleBuilder
21
- } from "./index-9wh04mqy.js";
21
+ } from "./index-0z8sbdme.js";
22
22
  import {
23
23
  FileSys2
24
- } from "./index-by2tvsq6.js";
24
+ } from "./index-zyjztrvc.js";
25
25
  import {
26
26
  AsyncDefaultExportDetector,
27
27
  StoreBootstrap,
28
28
  resolveSsrPageEntriesForApp
29
- } from "./index-z92zm3wd.js";
29
+ } from "./index-b372rck5.js";
30
30
 
31
31
  // pkgs/@akanjs/devkit/frontendBuild/clientEntryDiscovery.ts
32
32
  import fs from "fs";
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-2yn3r67f.js";
4
+ } from "./index-652f3bs8.js";
5
5
  import {
6
6
  jsonText
7
- } from "./index-zmd9xxgd.js";
7
+ } from "./index-1c2807kg.js";
8
8
  import {
9
9
  akanMcpInstallTargets
10
- } from "./index-h901f24n.js";
10
+ } from "./index-jdw9m5c4.js";
11
11
  import {
12
12
  ContextRunner2
13
- } from "./index-j0wr4e32.js";
13
+ } from "./index-qh81drde.js";
14
14
 
15
15
  // pkgs/@akanjs/cli/context/context.script.ts
16
16
  import { Logger } from "akanjs/common";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  execEmoji,
4
4
  Executor
5
- } from "./index-71y6176j.js";
5
+ } from "./index-pc42gxa5.js";
6
6
  // pkgs/@akanjs/devkit/executors/moduleExecutor.ts
7
7
  class ModuleExecutor extends Executor {
8
8
  sys;
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  FileSys2
4
- } from "./index-by2tvsq6.js";
4
+ } from "./index-zyjztrvc.js";
5
5
  import {
6
6
  ShellOnlyEnv
7
7
  } from "./index-bejy9zyc.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-2yn3r67f.js";
5
+ } from "./index-652f3bs8.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/page/page.runner.ts
8
8
  class PageRunner extends runner("page") {
@@ -5,17 +5,14 @@ import {
5
5
  WorkspaceExecutor,
6
6
  ServerEnvProfile,
7
7
  AkanAppConfig
8
- } from "./index-71y6176j.js";
8
+ } from "./index-pc42gxa5.js";
9
9
  import {
10
10
  resolveAppId,
11
11
  targetHtmlFilename
12
12
  } from "./index-m9jj544v.js";
13
- import {
14
- CsrArtifactBuilder
15
- } from "./index-a860mx0m.js";
16
13
  import {
17
14
  ExitCodeError
18
- } from "./index-2yn3r67f.js";
15
+ } from "./index-652f3bs8.js";
19
16
 
20
17
  // pkgs/@akanjs/devkit/mobile/desktopBin.ts
21
18
  import { chmod, mkdir, rename, rm, writeFile } from "fs/promises";
@@ -1126,12 +1123,14 @@ class NativePublicEnv {
1126
1123
  return [...new Set([...Object.keys(a), ...Object.keys(b)])].filter((key) => a[key] !== b[key]).sort((x, y) => x < y ? -1 : x > y ? 1 : 0);
1127
1124
  }
1128
1125
  static async built(app) {
1126
+ const { CsrArtifactBuilder } = await import("./csrArtifactBuilder-gtvff6k7.js");
1129
1127
  const file = Bun.file(CsrArtifactBuilder.publicEnvPath(app));
1130
1128
  if (!await file.exists())
1131
1129
  return null;
1132
1130
  return NativePublicEnv.of(await file.json());
1133
1131
  }
1134
1132
  static async inlined(app) {
1133
+ const { CsrArtifactBuilder } = await import("./csrArtifactBuilder-gtvff6k7.js");
1135
1134
  const file = Bun.file(CsrArtifactBuilder.publicEnvPath(app));
1136
1135
  const env = await file.exists() ? await file.json() : process.env;
1137
1136
  return Object.fromEntries(Object.entries(env).flatMap(([key, value]) => key.startsWith("AKAN_PUBLIC_") && typeof value === "string" ? [[key, value]] : []));
@@ -39,7 +39,7 @@ class FileSys2 {
39
39
  return await Bun.file(path).write(content);
40
40
  }
41
41
  static async writeTextAtomic(filePath, content) {
42
- const temp = `${filePath}.${process.pid}.${Date.now().toString(36)}.tmp`;
42
+ const temp = `${filePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
43
43
  try {
44
44
  await Bun.write(temp, content);
45
45
  await FileSys2.replace(temp, filePath);
package/index.js CHANGED
@@ -4,14 +4,14 @@ import {
4
4
  getTargetMetas,
5
5
  getTargetCommandNames,
6
6
  runCommands
7
- } from "./index-2yn3r67f.js";
7
+ } from "./index-652f3bs8.js";
8
8
  import"./index-j4yvgfhr.js";
9
- import"./index-71y6176j.js";
10
- import"./index-by2tvsq6.js";
11
- import"./index-z92zm3wd.js";
12
- import"./index-zfnz878d.js";
13
- import"./index-w1zexzpx.js";
14
- import"./index-7wf8snar.js";
9
+ import"./index-pc42gxa5.js";
10
+ import"./index-zyjztrvc.js";
11
+ import"./index-b372rck5.js";
12
+ import"./index-f2arv0mv.js";
13
+ import"./index-mnhrqjjq.js";
14
+ import"./index-whvhsb5f.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/bunVersionGuard.ts
17
17
  class BunVersionGuard {
@@ -27,27 +27,27 @@ import path from "path";
27
27
 
28
28
  // pkgs/@akanjs/cli/commandModules.ts
29
29
  var commandModules = {
30
- workspace: async () => (await import("./workspace.command-ahhfpaag.js")).WorkspaceCommand,
31
- agent: async () => (await import("./agent.command-x65f2ags.js")).AgentCommand,
32
- code: async () => (await import("./code.command-5smx61yf.js")).CodeCommand,
33
- application: async () => (await import("./application.command-azbd1pb2.js")).ApplicationCommand,
34
- library: async () => (await import("./library.command-nxvesvhb.js")).LibraryCommand,
35
- localRegistry: async () => (await import("./localRegistry.command-xz62e4ng.js")).LocalRegistryCommand,
36
- package: async () => (await import("./package.command-j7hv26p0.js")).PackageCommand,
37
- module: async () => (await import("./module.command-aaws9byg.js")).ModuleCommand,
38
- page: async () => (await import("./page.command-7yffs7n9.js")).PageCommand,
39
- context: async () => (await import("./context.command-ym5jbkny.js")).ContextCommand,
40
- cloud: async () => (await import("./cloud.command-gapp4634.js")).CloudCommand,
41
- subspace: async () => (await import("./subspace.command-4n4n4jpv.js")).SubspaceCommand,
42
- guideline: async () => (await import("./guideline.command-zwypaqsh.js")).GuidelineCommand,
43
- scalar: async () => (await import("./scalar.command-2ex84spb.js")).ScalarCommand,
44
- primitive: async () => (await import("./primitive.command-7a1pt715.js")).PrimitiveCommand,
45
- quality: async () => (await import("./quality.command-c6mvrjh1.js")).QualityCommand,
46
- verify: async () => (await import("./verify.command-zrkxnvct.js")).VerifyCommand,
47
- repair: async () => (await import("./repair.command-093adzt9.js")).RepairCommand,
48
- workflow: async () => (await import("./workflow.command-ks16jegk.js")).WorkflowCommand,
49
- pipeline: async () => (await import("./pipeline.command-7yk0zcng.js")).PipelineCommand,
50
- tunnel: async () => (await import("./tunnel.command-f7ep1qfa.js")).TunnelCommand
30
+ workspace: async () => (await import("./workspace.command-75gc280j.js")).WorkspaceCommand,
31
+ agent: async () => (await import("./agent.command-g1mj34wz.js")).AgentCommand,
32
+ code: async () => (await import("./code.command-9b967qpg.js")).CodeCommand,
33
+ application: async () => (await import("./application.command-3w4v7t40.js")).ApplicationCommand,
34
+ library: async () => (await import("./library.command-b02aw1hm.js")).LibraryCommand,
35
+ localRegistry: async () => (await import("./localRegistry.command-3hg1p4aj.js")).LocalRegistryCommand,
36
+ package: async () => (await import("./package.command-xmr0mxze.js")).PackageCommand,
37
+ module: async () => (await import("./module.command-bd9gz6cv.js")).ModuleCommand,
38
+ page: async () => (await import("./page.command-x94qf58g.js")).PageCommand,
39
+ context: async () => (await import("./context.command-ndzs5rbf.js")).ContextCommand,
40
+ cloud: async () => (await import("./cloud.command-ph0rz6sw.js")).CloudCommand,
41
+ subspace: async () => (await import("./subspace.command-dtv8nfh7.js")).SubspaceCommand,
42
+ guideline: async () => (await import("./guideline.command-y8qz9kxy.js")).GuidelineCommand,
43
+ scalar: async () => (await import("./scalar.command-61cjmxn1.js")).ScalarCommand,
44
+ primitive: async () => (await import("./primitive.command-cs7v376h.js")).PrimitiveCommand,
45
+ quality: async () => (await import("./quality.command-nqngh1jd.js")).QualityCommand,
46
+ verify: async () => (await import("./verify.command-4f260t53.js")).VerifyCommand,
47
+ repair: async () => (await import("./repair.command-v2medwsm.js")).RepairCommand,
48
+ workflow: async () => (await import("./workflow.command-tm5q9xsm.js")).WorkflowCommand,
49
+ pipeline: async () => (await import("./pipeline.command-n2843k6t.js")).PipelineCommand,
50
+ tunnel: async () => (await import("./tunnel.command-fmwm5fgb.js")).TunnelCommand
51
51
  };
52
52
  var commandModuleIds = Object.keys(commandModules);
53
53
 
@@ -75,6 +75,8 @@ class CommandManifest {
75
75
  }
76
76
  static resolve(manifest, argv) {
77
77
  const requested = argv[2];
78
+ if (requested === "--version" || requested === "-V")
79
+ return [];
78
80
  if (!manifest || !requested || requested.startsWith("-"))
79
81
  return null;
80
82
  const id = manifest.byCommand[requested];
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  LibExecutor2
4
- } from "./index-zfnz878d.js";
5
- import"./index-71y6176j.js";
4
+ } from "./index-f2arv0mv.js";
5
+ import"./index-pc42gxa5.js";
6
6
  import"./index-j4yvgfhr.js";
7
- import"./index-by2tvsq6.js";
7
+ import"./index-zyjztrvc.js";
8
8
  export {
9
9
  LibExecutor2 as LibExecutor
10
10
  };
@@ -3,17 +3,17 @@ import {
3
3
  Lib,
4
4
  Workspace,
5
5
  command
6
- } from "./index-2yn3r67f.js";
6
+ } from "./index-652f3bs8.js";
7
7
  import"./index-j4yvgfhr.js";
8
- import"./index-71y6176j.js";
9
- import"./index-by2tvsq6.js";
10
- import"./index-z92zm3wd.js";
11
- import"./index-zfnz878d.js";
12
- import"./index-w1zexzpx.js";
8
+ import"./index-pc42gxa5.js";
9
+ import"./index-zyjztrvc.js";
10
+ import"./index-b372rck5.js";
11
+ import"./index-f2arv0mv.js";
12
+ import"./index-mnhrqjjq.js";
13
13
  import {
14
14
  LibraryScript
15
- } from "./index-2jmvfa62.js";
16
- import"./index-7wf8snar.js";
15
+ } from "./index-0csk6jqm.js";
16
+ import"./index-whvhsb5f.js";
17
17
 
18
18
  // pkgs/@akanjs/cli/library/library.command.ts
19
19
  class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
@@ -4,48 +4,43 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-2yn3r67f.js";
7
+ } from "./index-652f3bs8.js";
8
8
  import"./index-j4yvgfhr.js";
9
9
  import {
10
10
  parseEnvFile
11
- } from "./index-71y6176j.js";
12
- import"./index-by2tvsq6.js";
13
- import"./index-z92zm3wd.js";
14
- import"./index-zfnz878d.js";
11
+ } from "./index-pc42gxa5.js";
12
+ import"./index-zyjztrvc.js";
13
+ import"./index-b372rck5.js";
14
+ import"./index-f2arv0mv.js";
15
15
  import {
16
16
  PkgExecutor2
17
- } from "./index-w1zexzpx.js";
17
+ } from "./index-mnhrqjjq.js";
18
18
  import {
19
19
  npmRegistryFromEnv,
20
20
  warnIgnoredNpmRegistry,
21
21
  getNpmRegistryUrl
22
22
  } from "./index-jf4vk1s0.js";
23
- import"./index-dmcpetwe.js";
24
- import"./index-ebn9kgea.js";
25
- import"./index-612fdtbk.js";
23
+ import"./index-6j351de4.js";
24
+ import"./index-ymgsvhc5.js";
25
+ import"./index-2kh4xj3m.js";
26
26
  import"./index-m9jj544v.js";
27
- import"./index-9wh04mqy.js";
28
- import"./index-a860mx0m.js";
29
- import"./index-2jmvfa62.js";
30
- import"./index-z96ks033.js";
27
+ import"./index-0csk6jqm.js";
28
+ import"./index-d0n78fzc.js";
31
29
  import"./index-rwgqba9p.js";
32
30
  import {
33
31
  ApplicationScript
34
- } from "./index-41a03gkj.js";
35
- import"./index-s885g0jj.js";
32
+ } from "./index-b0t92k71.js";
33
+ import"./index-45aprybg.js";
36
34
  import {
37
35
  CloudRunner
38
- } from "./index-xwwex8rf.js";
39
- import"./index-trffs83s.js";
40
- import"./index-p7beqww9.js";
41
- import"./index-baccvws5.js";
42
- import"./index-2ny1e95c.js";
36
+ } from "./index-3569fr49.js";
37
+ import"./index-ktxdfqg5.js";
43
38
  import {
44
39
  PackageScript
45
- } from "./index-275a4r3n.js";
46
- import"./index-j592zfqc.js";
40
+ } from "./index-ankyx6dj.js";
41
+ import"./index-9rymt8d6.js";
47
42
  import"./index-9bv479q5.js";
48
- import"./index-7wf8snar.js";
43
+ import"./index-whvhsb5f.js";
49
44
 
50
45
  // pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
51
46
  import { mkdir, rm } from "fs/promises";