@akanjs/cli 3.0.2-rc.0 → 3.1.0-rc.0

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 (86) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-szbjv4gv.js → CodeAgent-q7a4srt6.js} +2 -2
  3. package/{CodeTui-5nw86ab6.js → CodeTui-ak23dxc9.js} +1 -1
  4. package/{TunnelShare-cwh9ezsm.js → TunnelShare-21mm6dr5.js} +2 -2
  5. package/{agent.command-np1dffkb.js → agent.command-f3gsc1gd.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-fyjy9ryc.js → application.command-3v2d53gd.js} +38 -16
  8. package/{applicationBuildRunner-etrzfwjj.js → applicationBuildRunner-1yaqsrdq.js} +115 -103
  9. package/buildBatch.proc.js +17 -6
  10. package/cloud.command-kk2rwkvw.js +187 -0
  11. package/cloud.script-r7eyfey4.js +20 -0
  12. package/{code.command-hmtx14b2.js → code.command-30sca09d.js} +6 -6
  13. package/commandManifest.json +1 -1
  14. package/{context.command-6aqvdx43.js → context.command-k7eqacq6.js} +13 -13
  15. package/context.runner-hqd1ppqe.js +21 -0
  16. package/{guideline.command-axvf68gc.js → guideline.command-dtczrqpf.js} +2 -2
  17. package/guidelines/agentRule/agentRule.instruction.md +10 -2
  18. package/guidelines/conventions/conventions.instruction.md +68 -25
  19. package/guidelines/cssRule/cssRule.instruction.md +19 -0
  20. package/guidelines/mcpRule/mcpRule.instruction.md +67 -12
  21. package/guidelines/queryRule/queryRule.instruction.md +11 -1
  22. package/guidelines/runtimeRule/runtimeRule.instruction.md +97 -16
  23. package/guidelines/ssrRule/ssrRule.instruction.md +10 -7
  24. package/guidelines/transportRule/transportRule.instruction.md +19 -0
  25. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +6 -6
  26. package/incrementalBuilder.proc.js +25 -4
  27. package/{index-h9ht6s60.js → index-05g3jayg.js} +1 -1
  28. package/{index-j38qkvkk.js → index-0bm04n5g.js} +12 -10
  29. package/{index-g38nhv87.js → index-2etcv0sc.js} +1 -1
  30. package/{index-zyw622y1.js → index-2mx692qq.js} +3 -3
  31. package/{index-jb0hmt3k.js → index-2t4tqd1c.js} +3 -3
  32. package/{index-50wb2a26.js → index-55mynnqs.js} +354 -129
  33. package/{index-q6ft9fkc.js → index-6jjtnhkw.js} +8 -3
  34. package/index-6w0rbr9d.js +68 -0
  35. package/{index-2wc41k5w.js → index-7bymavqk.js} +2 -2
  36. package/{index-krjcg4y6.js → index-aprt7pkz.js} +7 -10
  37. package/{index-1bjkfvm9.js → index-c1x0be5j.js} +2 -2
  38. package/{index-d95tfg3n.js → index-c2yrsxdh.js} +14 -8
  39. package/{index-cb6yc5mb.js → index-c76k723e.js} +2 -2
  40. package/{index-6keyf4sg.js → index-ctanya41.js} +4 -4
  41. package/{index-f4e08ptp.js → index-e0cvze1s.js} +4 -4
  42. package/{index-hp3stk1m.js → index-fm46xrf1.js} +3 -3
  43. package/{index-3xmzr1p1.js → index-gnyf1fqy.js} +2 -2
  44. package/{index-zwd84m0w.js → index-jyv387qw.js} +4 -4
  45. package/{index-senscydg.js → index-k9rrten6.js} +6 -1
  46. package/{index-jk9xnck6.js → index-kjvrq3nc.js} +231 -133
  47. package/{index-xwprn9nr.js → index-nz15k0b6.js} +1 -1
  48. package/{index-61mmsdjg.js → index-p9ystjrp.js} +174 -72
  49. package/index-q958tqqg.js +77 -0
  50. package/{index-50jjwg8y.js → index-qt22xstj.js} +1 -1
  51. package/{index-94s080qm.js → index-r2tpeb3n.js} +127 -1
  52. package/{index-bsv901fd.js → index-rwq3ekqc.js} +7 -7
  53. package/{index-gvpvxdm1.js → index-tn4rpqp1.js} +96 -12
  54. package/{index-1gs9g12n.js → index-v29746vb.js} +4 -4
  55. package/index-ww9bhp67.js +62 -0
  56. package/{index-hxnnfy57.js → index-y8q31011.js} +180 -8
  57. package/index.js +22 -21
  58. package/{library.command-9m2rdwwz.js → library.command-gaga5bmq.js} +3 -3
  59. package/{localRegistry.command-vacc2njh.js → localRegistry.command-9e84e32q.js} +10 -10
  60. package/{module.command-q63dffya.js → module.command-7vpf6db4.js} +5 -5
  61. package/{package.command-y2jh0m99.js → package.command-twmvvf69.js} +3 -3
  62. package/package.json +2 -2
  63. package/{page.command-f3e4cwhh.js → page.command-5asq7fdf.js} +3 -3
  64. package/pipeline.command-d0v38572.js +1334 -0
  65. package/{primitive.command-r4kq75qj.js → primitive.command-dyrs2fm8.js} +6 -6
  66. package/projectTypecheck-cvtkrzp2.js +7 -0
  67. package/{quality.command-f7gzh26z.js → quality.command-6emsqpbg.js} +5 -4
  68. package/{repair.command-0qmyr6qa.js → repair.command-8t6aegv5.js} +5 -5
  69. package/{scalar.command-kddn7av4.js → scalar.command-bnggy1x7.js} +4 -4
  70. package/{subspace.command-j7ayp382.js → subspace.command-f02j5tge.js} +158 -91
  71. package/templates/app/tsconfig.json.template +1 -6
  72. package/templates/appSample/page/task/[taskId]/_index.tsx +2 -2
  73. package/templates/appSample/page/task/[taskId]/edit.tsx +2 -2
  74. package/templates/appSample/page/task/_index.tsx +2 -2
  75. package/templates/crudPages/[__model__Id]/edit/page.tsx +2 -2
  76. package/templates/crudPages/[__model__Id]/page.tsx +3 -3
  77. package/templates/crudPages/page.tsx +2 -2
  78. package/templates/crudSinglePage/page.tsx +3 -3
  79. package/templates/lib/cnst.ts +2 -2
  80. package/templates/lib/sig.ts +3 -3
  81. package/{tunnel.command-b3ymdk4f.js → tunnel.command-9x8nfn75.js} +16 -13
  82. package/{workflow.command-z1srcdfw.js → workflow.command-jx0wag5r.js} +10 -10
  83. package/{workspace.command-17c46dbp.js → workspace.command-cmj6mqyk.js} +58 -28
  84. package/cloud.command-c0rnwy65.js +0 -95
  85. package/cloud.script-6ba8e9v8.js +0 -20
  86. package/context.runner-hnkvv3z3.js +0 -21
@@ -10,7 +10,7 @@ import {
10
10
  LibExecutor,
11
11
  PkgExecutor,
12
12
  ModuleExecutor
13
- } from "./index-50wb2a26.js";
13
+ } from "./index-55mynnqs.js";
14
14
 
15
15
  // pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
16
16
  var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -537,9 +537,10 @@ var getInternalArgumentValue = async (argMeta, value, workspace) => {
537
537
  throw new Error(`Invalid system type: ${argMeta.type}`);
538
538
  };
539
539
  var runCommands = async (...commands) => {
540
+ let failureExitCode = 1;
540
541
  process.on("unhandledRejection", (error) => {
541
542
  printCliError(error);
542
- process.exit(1);
543
+ process.exit(failureExitCode);
543
544
  });
544
545
  const __dirname2 = getDirname2(import.meta.url);
545
546
  const packageJsonCandidates = [`${path2.dirname(Bun.main)}/package.json`, `${__dirname2}/../package.json`];
@@ -576,6 +577,9 @@ It may cause unexpected behavior. Run \`akan update\` to update latest akanjs.`)
576
577
  let programCommand = program.command(commandName, {
577
578
  hidden: targetMeta.targetOption.devOnly
578
579
  });
580
+ const targetFailureExitCode = targetMeta.targetOption.failureExitCode;
581
+ if (targetFailureExitCode !== undefined)
582
+ programCommand.exitOverride((error) => process.exit(error.exitCode === 0 ? 0 : targetFailureExitCode));
579
583
  const [allArgMetas] = getArgMetas(command, targetMeta.key);
580
584
  for (const argMeta of allArgMetas) {
581
585
  if (argMeta.type === "Option")
@@ -598,6 +602,7 @@ It may cause unexpected behavior. Run \`akan update\` to update latest akanjs.`)
598
602
  return formatCommandHelp(command, targetMeta.key);
599
603
  };
600
604
  programCommand.action(async (...args) => {
605
+ failureExitCode = targetFailureExitCode ?? 1;
601
606
  if (!targetMeta.targetOption.stdio)
602
607
  Logger.rawLog();
603
608
  const cmdArgs = args.slice(0, args.length - 2);
@@ -642,7 +647,7 @@ It may cause unexpected behavior. Run \`akan update\` to update latest akanjs.`)
642
647
  }
643
648
  await program.parseAsync(process.argv).catch((error) => {
644
649
  printCliError(error);
645
- process.exit(1);
650
+ process.exit(failureExitCode);
646
651
  });
647
652
  };
648
653
 
@@ -0,0 +1,68 @@
1
+ // @bun
2
+ // pkgs/@akanjs/devkit/typecheck/projectTypecheck.ts
3
+ import { mkdir, rm } from "fs/promises";
4
+ import path from "path";
5
+
6
+ class ProjectTypecheck2 {
7
+ projectDir;
8
+ workspaceRoot;
9
+ env;
10
+ static #testIncludes = ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"];
11
+ static #excludes = [".akan/**", "node_modules/**", "local/**"];
12
+ constructor(projectDir, workspaceRoot, env) {
13
+ this.projectDir = projectDir;
14
+ this.workspaceRoot = workspaceRoot;
15
+ this.env = env;
16
+ }
17
+ get typecheckDir() {
18
+ return path.join(this.projectDir, ".akan", "typecheck");
19
+ }
20
+ async run(entries, { clean = false, incremental = true, tests = false } = {}) {
21
+ const name = tests ? "tsconfig.tests" : "tsconfig";
22
+ await mkdir(this.typecheckDir, { recursive: true });
23
+ const tsconfig = {
24
+ extends: "../../tsconfig.json",
25
+ compilerOptions: { noEmit: true, incremental, tsBuildInfoFile: `./${name}.tsbuildinfo` },
26
+ include: [...entries, ...tests ? ProjectTypecheck2.#testIncludes.map((glob) => `../../${glob}`) : []],
27
+ ...tests ? { exclude: ProjectTypecheck2.#excludes.map((glob) => `../../${glob}`) } : {},
28
+ references: []
29
+ };
30
+ const tsconfigPath = path.join(this.typecheckDir, `${name}.json`);
31
+ await Bun.write(tsconfigPath, `${JSON.stringify(tsconfig, null, 2)}
32
+ `);
33
+ if (clean)
34
+ await rm(path.join(this.typecheckDir, `${name}.tsbuildinfo`), { force: true });
35
+ await this.#check(tsconfigPath);
36
+ return tsconfigPath;
37
+ }
38
+ async#check(tsconfigPath) {
39
+ const proc = Bun.spawn([process.execPath, await this.#workerEntry()], {
40
+ cwd: this.workspaceRoot,
41
+ env: { ...this.env, AKAN_COMMAND_TYPE: "typecheck", AKAN_TYPECHECK_TSCONFIG: tsconfigPath },
42
+ stdout: "pipe",
43
+ stderr: "pipe"
44
+ });
45
+ const [stdout, stderr, exitCode] = await Promise.all([
46
+ new Response(proc.stdout).text(),
47
+ new Response(proc.stderr).text(),
48
+ proc.exited
49
+ ]);
50
+ if (exitCode !== 0)
51
+ throw new Error((stderr || stdout).trim() || `Typecheck failed with exit code ${exitCode}`);
52
+ }
53
+ async#workerEntry() {
54
+ const candidates = [
55
+ path.join(this.workspaceRoot, "pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts"),
56
+ path.join(this.workspaceRoot, "node_modules/@akanjs/devkit/typecheck/typecheck.proc.ts"),
57
+ path.join(import.meta.dir, "typecheck.proc.js"),
58
+ path.join(import.meta.dir, "typecheck.proc.ts"),
59
+ path.join(import.meta.dir, "..", "typecheck.proc.js")
60
+ ];
61
+ for (const candidate of candidates)
62
+ if (await Bun.file(candidate).exists())
63
+ return candidate;
64
+ throw new Error(`[cli] typecheck worker entry not found; looked in: ${candidates.join(", ")}`);
65
+ }
66
+ }
67
+
68
+ export { ProjectTypecheck2 };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  GlobalConfig,
4
4
  CloudApi
5
- } from "./index-94s080qm.js";
5
+ } from "./index-r2tpeb3n.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/tunnel/TunnelShare.ts
8
8
  import { TunnelAgent } from "akanjs/server/tunnel";
@@ -18,7 +18,7 @@ class TunnelShare2 {
18
18
  this.grant = grant;
19
19
  }
20
20
  static async open(app, { workspace, host, port, ttlMinutes, onLost }) {
21
- const api = await CloudApi.fromHost(workspace, host ?? GlobalConfig.akanCloudHost);
21
+ const api = await CloudApi.fromHost(workspace, await GlobalConfig.hostFor(workspace, host));
22
22
  const grant = await api.requestTunnel({ name: app.name, ...ttlMinutes ? { ttlMinutes } : {} });
23
23
  const origin = `http://localhost:${port ?? await app.getDevPort()}`;
24
24
  const agent = new TunnelAgent({
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  SOURCE_EXTS,
4
4
  WatchRootResolver
5
- } from "./index-senscydg.js";
5
+ } from "./index-k9rrten6.js";
6
6
  import {
7
7
  FileSys2
8
8
  } from "./index-52w0fvh8.js";
9
9
  import {
10
10
  AsyncDefaultExportDetector,
11
11
  resolveSsrPageEntriesForApp
12
- } from "./index-50wb2a26.js";
12
+ } from "./index-55mynnqs.js";
13
13
 
14
14
  // pkgs/@akanjs/devkit/artifact/routeSeedIndex.ts
15
15
  import path from "path";
@@ -2103,13 +2103,7 @@ import path11 from "path";
2103
2103
  var DEFAULT_INCLUDE = ["akanjs/", "@apps/", "@libs/"];
2104
2104
  var DEFAULT_EXCLUDE_EXACT = new Set(["akanjs/webkit", "@akanjs/cli", "@akanjs/devkit"]);
2105
2105
  var DEFAULT_EXCLUDE_PREFIX = ["@akanjs/cli/", "@akanjs/devkit/"];
2106
- var OPTIONAL_BACKEND_EXTERNAL_EXACT = new Set([
2107
- "@libsql/client",
2108
- "bullmq",
2109
- "ioredis",
2110
- "postgres",
2111
- "protobufjs"
2112
- ]);
2106
+ var OPTIONAL_BACKEND_EXTERNAL_EXACT = new Set(["bullmq", "ioredis", "postgres", "protobufjs"]);
2113
2107
  var RUNTIME_EXTERNAL_EXACT = new Set([
2114
2108
  "react",
2115
2109
  "react-dom",
@@ -2319,10 +2313,12 @@ class PagesBundleBuilder {
2319
2313
  #command;
2320
2314
  #pageEntries;
2321
2315
  #started = Date.now();
2322
- constructor(app, command = "start", pageEntries) {
2316
+ #serverEnv;
2317
+ constructor(app, command = "start", pageEntries, serverEnv) {
2323
2318
  this.#app = app;
2324
2319
  this.#command = command;
2325
2320
  this.#pageEntries = pageEntries;
2321
+ this.#serverEnv = serverEnv;
2326
2322
  }
2327
2323
  async build() {
2328
2324
  const akanConfig = await this.#app.getConfig();
@@ -2349,6 +2345,7 @@ class PagesBundleBuilder {
2349
2345
  define: bundleDefine(this.#app, this.#command, "ssr"),
2350
2346
  metafile: dev,
2351
2347
  plugins: [
2348
+ ...this.#serverEnv ? [this.#serverEnv] : [],
2352
2349
  PagesBundleBuilder.createPagesEntryPlugin(entrySource),
2353
2350
  PagesBundleBuilder.createCssStubPlugin(),
2354
2351
  PagesBundleBuilder.createServerUseClientFetchPlugin(),
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-q6ft9fkc.js";
5
+ } from "./index-6jjtnhkw.js";
6
6
  import {
7
7
  LibSource,
8
8
  formatLibStatuses,
9
9
  LibExecutor
10
- } from "./index-50wb2a26.js";
10
+ } from "./index-55mynnqs.js";
11
11
 
12
12
  // pkgs/@akanjs/cli/library/library.script.ts
13
13
  import { Logger } from "akanjs/common";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-50wb2a26.js";
4
+ } from "./index-55mynnqs.js";
5
5
  import {
6
6
  computeRouteSeedIndex,
7
7
  saveRouteSeedIndex,
@@ -16,10 +16,10 @@ import {
16
16
  CsrEntryFiles,
17
17
  PagesEntrySourceGenerator,
18
18
  PagesBundleBuilder
19
- } from "./index-krjcg4y6.js";
19
+ } from "./index-aprt7pkz.js";
20
20
  import {
21
21
  SOURCE_EXTS
22
- } from "./index-senscydg.js";
22
+ } from "./index-k9rrten6.js";
23
23
  var __require = import.meta.require;
24
24
 
25
25
  // pkgs/@akanjs/devkit/frontendBuild/allRoutesBuilder.ts
@@ -135,10 +135,12 @@ class CsrArtifactBuilder {
135
135
  #app;
136
136
  #command;
137
137
  #lang;
138
- constructor(app, command = "start", lang = "en") {
138
+ #cssAssets;
139
+ constructor(app, command = "start", lang = "en", { cssAssets = null } = {}) {
139
140
  this.#app = app;
140
141
  this.#command = command;
141
142
  this.#lang = lang;
143
+ this.#cssAssets = cssAssets;
142
144
  }
143
145
  async build() {
144
146
  const pageKeys = await this.#app.getPageKeys();
@@ -238,6 +240,8 @@ void bootCsr(pages);
238
240
  ];
239
241
  }
240
242
  async#loadCssAssets() {
243
+ if (this.#cssAssets)
244
+ return this.#cssAssets;
241
245
  const artifactFile = Bun.file(path2.join(this.#artifactDir, "base-artifact.json"));
242
246
  if (!await artifactFile.exists())
243
247
  return {};
@@ -355,10 +359,10 @@ import { compile } from "tailwindcss";
355
359
 
356
360
  // pkgs/@akanjs/devkit/frontendBuild/cssCandidateCache.ts
357
361
  import { stat } from "fs/promises";
358
- var CANDIDATE_RE = /-?(?:[\w@]|\[[^\]\s]+\])[\w:/.-]*(?:\[[^\]\s]+\][\w:/.-]*)*/g;
362
+ var CANDIDATE_RE = /-?(?:[\w@]|\[[^\]\s]+\])[\w:/.-]*(?:(?:\[[^\]\s]+\]|\((?:[a-z-]+:)?--[^)\s]+\))[\w:/.-]*)*/g;
359
363
 
360
364
  class CssCandidateCache {
361
- static #version = 3;
365
+ static #version = 4;
362
366
  #path;
363
367
  #entries = new Map;
364
368
  #dirty = false;
@@ -1604,9 +1608,11 @@ class SsrBaseArtifactBuilder {
1604
1608
  #artifactDir;
1605
1609
  #absArtifactDir;
1606
1610
  #started = Date.now();
1607
- constructor(app, command = "start") {
1611
+ #serverEnv;
1612
+ constructor(app, command = "start", { serverEnv } = {}) {
1608
1613
  this.#app = app;
1609
1614
  this.#command = command;
1615
+ this.#serverEnv = serverEnv;
1610
1616
  this.#artifactDir = `${command === "build" ? app.dist.cwdPath : app.cwdPath}/.akan/artifact`;
1611
1617
  this.#absArtifactDir = path8.resolve(this.#artifactDir);
1612
1618
  }
@@ -1620,7 +1626,7 @@ class SsrBaseArtifactBuilder {
1620
1626
  this.#app.verbose(`[base-artifact] discovered ${pageKeys.length} route files under ${this.#app.cwdPath}/page`);
1621
1627
  const pageEntries = await resolveSsrPageEntriesForApp(this.#app, pageKeys);
1622
1628
  const { cssCompiler, optimizedFonts, cssAssets } = await this.#buildStyleAssets();
1623
- const pagesBundle = await new PagesBundleBuilder(this.#app, this.#command, pageEntries).build();
1629
+ const pagesBundle = await new PagesBundleBuilder(this.#app, this.#command, pageEntries, this.#serverEnv).build();
1624
1630
  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)`);
1625
1631
  const seedIndex = computeRouteSeedIndex(pageEntries);
1626
1632
  const seedIndexPath = await saveRouteSeedIndex(this.#absArtifactDir, seedIndex, {
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-q6ft9fkc.js";
5
+ } from "./index-6jjtnhkw.js";
6
6
  import {
7
7
  generatedFilesForSync,
8
8
  createPassedPrimitiveReport,
9
9
  scalarChangedFiles
10
- } from "./index-h9ht6s60.js";
10
+ } from "./index-05g3jayg.js";
11
11
  import {
12
12
  pluralizeName
13
13
  } from "./index-nz8prx9g.js";
@@ -1,12 +1,12 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-q6ft9fkc.js";
4
+ } from "./index-6jjtnhkw.js";
5
5
  import {
6
6
  AppExecutor,
7
7
  LibExecutor,
8
8
  ModuleExecutor
9
- } from "./index-50wb2a26.js";
9
+ } from "./index-55mynnqs.js";
10
10
  import {
11
11
  workflowStatus,
12
12
  compactDiagnostics,
@@ -41,10 +41,10 @@ import {
41
41
  hasSignalFactoryEntry,
42
42
  insertSignalFactoryEntry,
43
43
  addFieldUiPolicyForType
44
- } from "./index-h9ht6s60.js";
44
+ } from "./index-05g3jayg.js";
45
45
  import {
46
46
  ModuleScript
47
- } from "./index-f4e08ptp.js";
47
+ } from "./index-e0cvze1s.js";
48
48
 
49
49
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
50
50
  import { capitalize, lowerlize } from "akanjs/common";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-q6ft9fkc.js";
5
+ } from "./index-6jjtnhkw.js";
6
6
  import {
7
7
  ModuleExecutor
8
- } from "./index-50wb2a26.js";
8
+ } from "./index-55mynnqs.js";
9
9
  import {
10
10
  sourceFile,
11
11
  moduleSourcePaths,
@@ -13,10 +13,10 @@ import {
13
13
  createPassedPrimitiveReport,
14
14
  bilingualLabelForField,
15
15
  bilingualDescriptionForField
16
- } from "./index-h9ht6s60.js";
16
+ } from "./index-05g3jayg.js";
17
17
  import {
18
18
  PageScript
19
- } from "./index-g38nhv87.js";
19
+ } from "./index-2etcv0sc.js";
20
20
  import {
21
21
  pluralizeName
22
22
  } from "./index-nz8prx9g.js";
@@ -5,13 +5,13 @@ import {
5
5
  writeGeneratedSyncState,
6
6
  createRepairReport,
7
7
  renderRepairReport
8
- } from "./index-h9ht6s60.js";
8
+ } from "./index-05g3jayg.js";
9
9
  import {
10
10
  AkanContextAnalyzer
11
- } from "./index-zyw622y1.js";
11
+ } from "./index-2mx692qq.js";
12
12
  import {
13
13
  runner
14
- } from "./index-q6ft9fkc.js";
14
+ } from "./index-6jjtnhkw.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/repair/repair.runner.ts
17
17
  var spawnShell = async (workspace, command) => await workspace.spawn("bash", ["-lc", command.startsWith("akan ") ? `bun run ${command}` : command], {
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-q6ft9fkc.js";
5
+ } from "./index-6jjtnhkw.js";
6
6
  import {
7
7
  FileSys2
8
8
  } from "./index-52w0fvh8.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-50wb2a26.js";
11
+ } from "./index-55mynnqs.js";
12
12
  import {
13
13
  TypeScriptDependencyScanner2
14
14
  } from "./index-2ahj896a.js";
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  jsonText
4
- } from "./index-h9ht6s60.js";
4
+ } from "./index-05g3jayg.js";
5
5
  import {
6
6
  akanMcpInstallTargets
7
- } from "./index-zyw622y1.js";
7
+ } from "./index-2mx692qq.js";
8
8
  import {
9
9
  script
10
- } from "./index-q6ft9fkc.js";
10
+ } from "./index-6jjtnhkw.js";
11
11
  import {
12
12
  ContextRunner2
13
- } from "./index-j38qkvkk.js";
13
+ } from "./index-0bm04n5g.js";
14
14
 
15
15
  // pkgs/@akanjs/cli/context/context.script.ts
16
16
  import { Logger } from "akanjs/common";
@@ -80,6 +80,11 @@ import path3 from "path";
80
80
 
81
81
  // pkgs/@akanjs/devkit/akanApp/devHostPolicy.ts
82
82
  import path2 from "path";
83
+ var UNAVAILABLE_REDIS_HOST = "redis-tunnel-unavailable.invalid";
84
+ var redisTunnelPolicy = ({
85
+ environment,
86
+ databaseMode
87
+ }) => environment === "local" ? "none" : databaseMode === "single" ? "optional" : "required";
83
88
  var BACKEND_RECOVERY_MAX_ATTEMPTS = 5;
84
89
  var HELD_BUILDER_REQUEST_LIMIT = 64;
85
90
  var BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS = 30000;
@@ -833,4 +838,4 @@ class WatchRootResolver {
833
838
  }
834
839
  }
835
840
 
836
- export { ApplicationBuildReporter, BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS, SOURCE_EXTS, shouldRestartBackendByDevPlan, shouldRestartBuilderByDevPlan, shouldAbandonBackendRecovery, normalizeBackendReportedGeneration, shouldRestartDevHostByDevPlan, devHostStateOf, isLegacyBackendFallbackFile, shouldMarkBuildPhaseRecovered, shouldKeepBuildFailure, createBackendBuildStatus, backendRestartReasonFromMessage, mergeBackendRestartReasons, shouldReplaceLastGoodMessage, shouldQueueBuildStatusReplay, hasBuildFailureForGeneration, decideBuilderRssRecycle, decideBuilderRssSettle, decideIdleSuspend, resolveIdleSuspendMs, hasAnyBuildFailure, shouldRefreshConfigOnIdleWake, shouldHoldForReturningBuilder, shouldWarnBuilderRssCeilingTight, isRssCeilingUnreachable, shouldRelayRecycledFrontendState, mergeInvalidateMessages, buildStatusReplaySequence, filesChangedSince, HmrWatcher, WatchRootResolver };
841
+ export { ApplicationBuildReporter, UNAVAILABLE_REDIS_HOST, redisTunnelPolicy, BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS, SOURCE_EXTS, shouldRestartBackendByDevPlan, shouldRestartBuilderByDevPlan, shouldAbandonBackendRecovery, normalizeBackendReportedGeneration, shouldRestartDevHostByDevPlan, devHostStateOf, isLegacyBackendFallbackFile, shouldMarkBuildPhaseRecovered, shouldKeepBuildFailure, createBackendBuildStatus, backendRestartReasonFromMessage, mergeBackendRestartReasons, shouldReplaceLastGoodMessage, shouldQueueBuildStatusReplay, hasBuildFailureForGeneration, decideBuilderRssRecycle, decideBuilderRssSettle, decideIdleSuspend, resolveIdleSuspendMs, hasAnyBuildFailure, shouldRefreshConfigOnIdleWake, shouldHoldForReturningBuilder, shouldWarnBuilderRssCeilingTight, isRssCeilingUnreachable, shouldRelayRecycledFrontendState, mergeInvalidateMessages, buildStatusReplaySequence, filesChangedSince, HmrWatcher, WatchRootResolver };