@akanjs/cli 3.1.0-rc.4 → 3.1.0-rc.5

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 (89) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-ymte1tv8.js → CodeAgent-rkjyxgec.js} +2 -2
  3. package/{CodeTui-4rhdm1qw.js → CodeTui-h7pyj6xa.js} +1 -1
  4. package/TunnelShare-661cxz5e.js +14 -0
  5. package/{agent.command-r5x1mch5.js → agent.command-3qxf4xcj.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-3dkr7rdz.js → application.command-m1kcd7jf.js} +12 -11
  8. package/{applicationBuildRunner-h0j2swx1.js → applicationBuildRunner-dj0xkrep.js} +16 -9
  9. package/buildBatch.proc.js +7 -7
  10. package/{cloud.command-4kyxfw0y.js → cloud.command-3jzym8q7.js} +17 -16
  11. package/cloud.script-r4nskbc6.js +24 -0
  12. package/{code.command-sjvzt8fc.js → code.command-0ad6gw2a.js} +6 -6
  13. package/{context.command-j9frz0dz.js → context.command-0qx447mb.js} +17 -16
  14. package/context.runner-1vsjztjg.js +25 -0
  15. package/{dependencyScanner-06z2dmrr.js → dependencyScanner-3afj2vt1.js} +1 -1
  16. package/{guideline.command-1epw6hey.js → guideline.command-cv5bmrx2.js} +2 -2
  17. package/guidelines/conventions/conventions.instruction.md +450 -1084
  18. package/guidelines/cssRule/cssRule.instruction.md +16 -1
  19. package/guidelines/fieldRule/fieldRule.instruction.md +57 -0
  20. package/guidelines/framework/framework.instruction.md +4 -7
  21. package/guidelines/mcpRule/mcpRule.instruction.md +11 -8
  22. package/guidelines/modelConstant/modelConstant.instruction.md +2 -1
  23. package/guidelines/modelStore/modelStore.instruction.md +9 -0
  24. package/guidelines/pageRule/pageRule.instruction.md +80 -0
  25. package/guidelines/queryRule/queryRule.instruction.md +35 -8
  26. package/guidelines/runtimeRule/runtimeRule.instruction.md +89 -2
  27. package/guidelines/ssrRule/ssrRule.instruction.md +13 -0
  28. package/guidelines/transportRule/transportRule.instruction.md +76 -8
  29. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +4 -4
  30. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +49 -4
  31. package/incrementalBuilder.proc.js +4 -4
  32. package/{index-jw6st2rd.js → index-192ha4xh.js} +356 -307
  33. package/{index-1hkr7mrb.js → index-1p98exm2.js} +2 -2
  34. package/{index-8byzcvxp.js → index-1xj2t7cb.js} +7 -7
  35. package/{index-er3hekv9.js → index-20bxxyvn.js} +80 -80
  36. package/{index-xe3x2kw5.js → index-35hc95h5.js} +1 -1
  37. package/{index-p5nrc5he.js → index-4mhy6qme.js} +4 -4
  38. package/{index-0qc5nd61.js → index-5edzv8fn.js} +5 -5
  39. package/{index-k9rrten6.js → index-5nd1wtkv.js} +92 -94
  40. package/index-62md4dwy.js +260 -0
  41. package/{index-z3v7abrk.js → index-665zp9rs.js} +38 -15
  42. package/{index-1t2xw0p0.js → index-6xn2n442.js} +4 -4
  43. package/{index-jg3fj8h0.js → index-86jt2a0e.js} +1 -1
  44. package/{index-k33me5sp.js → index-8fp3b47h.js} +419 -418
  45. package/{index-shastb7m.js → index-9z426msb.js} +17 -12
  46. package/{index-gdybjw3x.js → index-awbdfcf2.js} +4 -4
  47. package/{index-3hx1z96c.js → index-bqbf654f.js} +1 -1
  48. package/{index-jppthsff.js → index-cpb3nvma.js} +57 -58
  49. package/{index-b60ccq2s.js → index-d47ypebv.js} +17 -15
  50. package/{index-gc05vqd2.js → index-d72hfmdm.js} +13 -13
  51. package/{index-akha197v.js → index-fmzcs8v6.js} +4 -4
  52. package/{index-28ftaz3d.js → index-fyq1z6kt.js} +29 -27
  53. package/{index-vwmv64ad.js → index-g1mbppa9.js} +238 -236
  54. package/{index-hedt951c.js → index-h47cf1gg.js} +7 -7
  55. package/{index-hfqs9jvc.js → index-j4mkhz93.js} +3 -3
  56. package/{index-08a5ga6n.js → index-jw1zm273.js} +28 -30
  57. package/{index-q958tqqg.js → index-m9jj544v.js} +1 -1
  58. package/{index-8935h3n1.js → index-mdjc93e1.js} +1 -1
  59. package/{index-2wyn17fa.js → index-pydbnfez.js} +2 -2
  60. package/{index-bjh4wbtk.js → index-qwa5k1j8.js} +1 -1
  61. package/{index-81a1ywp6.js → index-tamvyvj3.js} +3 -3
  62. package/{index-dez4t5sd.js → index-trpasv9q.js} +260 -259
  63. package/{index-2ahj896a.js → index-tvehn2sp.js} +1 -1
  64. package/{index-2k0t8p3p.js → index-va06nr10.js} +1086 -1075
  65. package/{index-9c3cd767.js → index-vk0pa0mn.js} +20 -21
  66. package/{index-qyaqzh8e.js → index-w44cy4vs.js} +2216 -2216
  67. package/index.js +22 -22
  68. package/{library.command-n58dgakb.js → library.command-erp2f56n.js} +3 -3
  69. package/{localRegistry.command-f2768sww.js → localRegistry.command-xxpqgxjw.js} +15 -14
  70. package/{module.command-xzjg5k7n.js → module.command-gs2r615e.js} +5 -5
  71. package/{package.command-24sh1j1q.js → package.command-7343f74r.js} +4 -4
  72. package/package.json +2 -2
  73. package/{page.command-fqnm88na.js → page.command-4h4a8pnh.js} +3 -3
  74. package/{pipeline.command-vn6taz75.js → pipeline.command-a2nrk26m.js} +3 -3
  75. package/{primitive.command-4j1g1a0d.js → primitive.command-w6t0asqz.js} +6 -6
  76. package/{projectTypecheck-3y7ayty0.js → projectTypecheck-f534enqj.js} +1 -1
  77. package/{quality.command-5hqmcdwt.js → quality.command-77x7vbbx.js} +4 -4
  78. package/{repair.command-rw5tk460.js → repair.command-y6sstev7.js} +5 -5
  79. package/{scalar.command-0jpap45m.js → scalar.command-20b8cy0k.js} +4 -4
  80. package/{subspace.command-y7n9sghk.js → subspace.command-92xkc0s0.js} +11 -10
  81. package/templates/lib/cnst.ts +0 -1
  82. package/templates/workspaceRoot/.gitignore.template +24 -53
  83. package/{tunnel.command-5gjwh1f8.js → tunnel.command-2kw8vt9g.js} +8 -7
  84. package/{workflow.command-3t22f7eb.js → workflow.command-2djwmpqf.js} +10 -10
  85. package/{workspace.command-cq5xg2jq.js → workspace.command-5se6spqb.js} +28 -27
  86. package/TunnelShare-p8ymkww8.js +0 -13
  87. package/cloud.script-jc3hc5d9.js +0 -23
  88. package/context.runner-v0def5my.js +0 -24
  89. package/index-n68jx79w.js +0 -120
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-2k0t8p3p.js";
4
+ } from "./index-va06nr10.js";
5
5
  import {
6
6
  computeRouteSeedIndex,
7
7
  saveRouteSeedIndex,
@@ -9,17 +9,20 @@ import {
9
9
  ClientEntriesBundler,
10
10
  VENDOR_SPECIFIERS,
11
11
  RouteClientBuilder
12
- } from "./index-qyaqzh8e.js";
12
+ } from "./index-w44cy4vs.js";
13
13
  import {
14
14
  SOURCE_EXTS
15
- } from "./index-k9rrten6.js";
15
+ } from "./index-5nd1wtkv.js";
16
16
  import {
17
17
  CsrEntryFiles,
18
18
  BarrelAnalyzer,
19
19
  createTsconfigPackageResolver,
20
20
  rewriteBarrelImports,
21
21
  PagesBundleBuilder
22
- } from "./index-jw6st2rd.js";
22
+ } from "./index-192ha4xh.js";
23
+ import {
24
+ CssBlockParser
25
+ } from "./index-62md4dwy.js";
23
26
  var __require = import.meta.require;
24
27
 
25
28
  // pkgs/@akanjs/devkit/frontendBuild/allRoutesBuilder.ts
@@ -127,7 +130,6 @@ class AllRoutesBuilder {
127
130
  this.#knownSet.add(abs);
128
131
  }
129
132
  }
130
-
131
133
  // pkgs/@akanjs/devkit/frontendBuild/cssCompiler.ts
132
134
  import path3 from "path";
133
135
  import { Logger } from "akanjs/common";
@@ -651,13 +653,19 @@ function isIgnoredNodeModuleSource(filePath) {
651
653
  return NODE_MODULES_RE.test(filePath) && !AKANJS_NODE_MODULE_RE.test(filePath);
652
654
  }
653
655
  function declaredCustomProperties(css) {
654
- const withoutThemeBlocks = css.replace(/@theme[^{]*\{[^}]*\}/g, "");
655
- return [...new Set([...withoutThemeBlocks.matchAll(/(?:^|[\s;{])(--[\w-]+)\s*:/g)].map(([, name]) => name))].filter((name) => !!name);
656
+ const names = new Set;
657
+ CssBlockParser.walk(CssBlockParser.parse(css), true, (node) => {
658
+ if (node.kind === "block")
659
+ return node.atRule === "@theme" ? null : true;
660
+ if (node.property.startsWith("--"))
661
+ names.add(node.property);
662
+ return null;
663
+ });
664
+ return [...names];
656
665
  }
657
666
  function getPageKeyBasePath(pageKey, basePaths) {
658
667
  return CsrEntryFiles.basePathOfPageKey(pageKey, basePaths);
659
668
  }
660
-
661
669
  // pkgs/@akanjs/devkit/frontendBuild/fontOptimizer.ts
662
670
  import { mkdir, stat as stat2 } from "fs/promises";
663
671
  import path4 from "path";
@@ -1045,7 +1053,7 @@ class FontOptimizer {
1045
1053
  const filePaths = [];
1046
1054
  for await (const filePath of glob.scan({ cwd: root, absolute: true }))
1047
1055
  filePaths.push(filePath);
1048
- for (const filePath of filePaths.sort())
1056
+ for (const filePath of filePaths.sort((a, b) => a < b ? -1 : a > b ? 1 : 0))
1049
1057
  parts.push(await Bun.file(filePath).text());
1050
1058
  }
1051
1059
  return parts.join("");
@@ -1146,7 +1154,6 @@ ${declarations.map(([prop, value]) => ` ${prop}: ${value};`).join(`
1146
1154
  return JSON.stringify(value);
1147
1155
  }
1148
1156
  }
1149
-
1150
1157
  // pkgs/@akanjs/devkit/frontendBuild/fontPruner.ts
1151
1158
  import { rm, rmdir, stat as stat3 } from "fs/promises";
1152
1159
  import path5 from "path";
@@ -1310,7 +1317,6 @@ class FontPruner {
1310
1317
  return await stat3(dir).then((entry) => entry.isDirectory(), () => false);
1311
1318
  }
1312
1319
  }
1313
-
1314
1320
  // pkgs/@akanjs/devkit/frontendBuild/precompressArtifacts.ts
1315
1321
  import fs from "fs";
1316
1322
  import path6 from "path";
@@ -1370,7 +1376,6 @@ async function shouldPrecompress(filePath) {
1370
1376
  return false;
1371
1377
  return file.size >= MIN_COMPRESS_BYTES;
1372
1378
  }
1373
-
1374
1379
  // pkgs/@akanjs/devkit/frontendBuild/ssrBaseArtifactBuilder.ts
1375
1380
  import path7 from "path";
1376
1381
  import { optimize } from "@tailwindcss/node";
@@ -1,12 +1,12 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-08a5ga6n.js";
4
+ } from "./index-jw1zm273.js";
5
5
  import {
6
6
  AppExecutor,
7
7
  LibExecutor,
8
8
  ModuleExecutor
9
- } from "./index-2k0t8p3p.js";
9
+ } from "./index-va06nr10.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-dez4t5sd.js";
44
+ } from "./index-trpasv9q.js";
45
45
  import {
46
46
  ModuleScript
47
- } from "./index-akha197v.js";
47
+ } from "./index-fmzcs8v6.js";
48
48
 
49
49
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
50
50
  import { capitalize, lowerlize } from "akanjs/common";
@@ -26,7 +26,7 @@ class ConfigLock {
26
26
  }
27
27
  static async#take(lockPath) {
28
28
  const handle = await open(lockPath, "wx", 384).catch((error) => {
29
- if (error.code === "EEXIST")
29
+ if (error.code === "EEXIST" || process.platform === "win32" && error.code === "EPERM")
30
30
  return null;
31
31
  throw error;
32
32
  });
@@ -2,23 +2,73 @@
2
2
  import {
3
3
  FileSys2
4
4
  } from "./index-52w0fvh8.js";
5
+ import {
6
+ resolveMobileTargets
7
+ } from "./index-m9jj544v.js";
5
8
  import {
6
9
  NativePublicEnv,
7
10
  UpdatePackFolder,
8
11
  NativeApp
9
- } from "./index-vwmv64ad.js";
10
- import {
11
- resolveMobileTargets
12
- } from "./index-q958tqqg.js";
12
+ } from "./index-g1mbppa9.js";
13
13
  import {
14
14
  ExitCodeError
15
- } from "./index-08a5ga6n.js";
15
+ } from "./index-jw1zm273.js";
16
16
  import {
17
17
  ConfigLock
18
- } from "./index-3hx1z96c.js";
18
+ } from "./index-bqbf654f.js";
19
+
20
+ // pkgs/@akanjs/devkit/cloud/cloudHttpError.ts
21
+ import { isRecord } from "akanjs/common";
22
+
23
+ class CloudHttpError extends Error {
24
+ status;
25
+ statusText;
26
+ url;
27
+ body;
28
+ headers;
29
+ static #errKey = /^[\w$-]+\.error\.[\w$-]+$/;
30
+ name = "CloudHttpError";
31
+ constructor(status, statusText, url, body, headers = new Headers) {
32
+ super(`${status} ${statusText} from ${url}: ${body.slice(0, 200)}`);
33
+ this.status = status;
34
+ this.statusText = statusText;
35
+ this.url = url;
36
+ this.body = body;
37
+ this.headers = headers;
38
+ }
39
+ static async of(response, url) {
40
+ return new CloudHttpError(response.status, response.statusText, url, await response.text(), response.headers);
41
+ }
42
+ static statusOf(error) {
43
+ return error instanceof CloudHttpError ? error.status : null;
44
+ }
45
+ get error() {
46
+ try {
47
+ const parsed = JSON.parse(this.body);
48
+ return isRecord(parsed) && typeof parsed.error === "string" ? parsed.error : null;
49
+ } catch {
50
+ return null;
51
+ }
52
+ }
53
+ get errKey() {
54
+ const { error } = this;
55
+ return error && CloudHttpError.#errKey.test(error) ? error : null;
56
+ }
57
+ get retryAfterMs() {
58
+ return CloudHttpError.retryAfterMs(this.headers.get("retry-after"));
59
+ }
60
+ static retryAfterMs(header) {
61
+ const value = header?.trim() ?? "";
62
+ if (!value)
63
+ return null;
64
+ const ms = /^\d+$/.test(value) ? Number(value) * 1000 : Date.parse(value) - Date.now();
65
+ return Number.isFinite(ms) ? Math.max(0, ms) : null;
66
+ }
67
+ }
19
68
 
20
69
  // pkgs/@akanjs/devkit/cloud/globalConfig.ts
21
70
  import { mkdir, rm, writeFile } from "fs/promises";
71
+ import { trimTrailingSlashes } from "akanjs/common";
22
72
  import dayjs from "dayjs";
23
73
 
24
74
  // pkgs/@akanjs/devkit/cloud/constants.ts
@@ -68,7 +118,7 @@ class GlobalConfig {
68
118
  }
69
119
  static #normalizeHost(host) {
70
120
  const url = URL.canParse(host) ? new URL(host) : null;
71
- return url && (url.protocol === "https:" || url.protocol === "http:") ? `${url.origin}${url.pathname.replace(/\/+$/, "")}` : host.replace(/\/+$/, "");
121
+ return url && (url.protocol === "https:" || url.protocol === "http:") ? `${url.origin}${trimTrailingSlashes(url.pathname)}` : trimTrailingSlashes(host);
72
122
  }
73
123
  static async getHostConfig(host = GlobalConfig.akanCloudHost) {
74
124
  const akanConfig = await GlobalConfig.#getAkanGlobalConfig();
@@ -169,55 +219,6 @@ class GlobalConfig {
169
219
  }
170
220
  }
171
221
 
172
- // pkgs/@akanjs/devkit/cloud/cloudHttpError.ts
173
- import { isRecord } from "akanjs/common";
174
-
175
- class CloudHttpError extends Error {
176
- status;
177
- statusText;
178
- url;
179
- body;
180
- headers;
181
- static #errKey = /^[\w$-]+\.error\.[\w$-]+$/;
182
- name = "CloudHttpError";
183
- constructor(status, statusText, url, body, headers = new Headers) {
184
- super(`${status} ${statusText} from ${url}: ${body.slice(0, 200)}`);
185
- this.status = status;
186
- this.statusText = statusText;
187
- this.url = url;
188
- this.body = body;
189
- this.headers = headers;
190
- }
191
- static async of(response, url) {
192
- return new CloudHttpError(response.status, response.statusText, url, await response.text(), response.headers);
193
- }
194
- static statusOf(error) {
195
- return error instanceof CloudHttpError ? error.status : null;
196
- }
197
- get error() {
198
- try {
199
- const parsed = JSON.parse(this.body);
200
- return isRecord(parsed) && typeof parsed.error === "string" ? parsed.error : null;
201
- } catch {
202
- return null;
203
- }
204
- }
205
- get errKey() {
206
- const { error } = this;
207
- return error && CloudHttpError.#errKey.test(error) ? error : null;
208
- }
209
- get retryAfterMs() {
210
- return CloudHttpError.retryAfterMs(this.headers.get("retry-after"));
211
- }
212
- static retryAfterMs(header) {
213
- const value = header?.trim() ?? "";
214
- if (!value)
215
- return null;
216
- const ms = /^\d+$/.test(value) ? Number(value) * 1000 : Date.parse(value) - Date.now();
217
- return Number.isFinite(ms) ? Math.max(0, ms) : null;
218
- }
219
- }
220
-
221
222
  // pkgs/@akanjs/devkit/cloud/cloudApi.ts
222
223
  class HttpClient {
223
224
  baseUrl;
@@ -370,7 +371,6 @@ class CloudApi {
370
371
  }
371
372
  }
372
373
  }
373
-
374
374
  // pkgs/@akanjs/devkit/cloud/cloudUpdates.ts
375
375
  import path2 from "path";
376
376
  import { Logger as Logger2 } from "akanjs/common";
@@ -585,7 +585,6 @@ ${(release.problems ?? []).map((problem) => ` - ${problem}`).join(`
585
585
  });
586
586
  }
587
587
  }
588
-
589
588
  // pkgs/@akanjs/devkit/cloud/pipelineSecrets.ts
590
589
  import { capitalize, Logger as Logger3, PipelineNames } from "akanjs/common";
591
590
  class PipelineSecrets {
@@ -35,44 +35,44 @@ import {
35
35
  filesChangedSince,
36
36
  HmrWatcher,
37
37
  WatchRootResolver
38
- } from "./index-k9rrten6.js";
38
+ } from "./index-5nd1wtkv.js";
39
39
  import {
40
40
  runner,
41
41
  script,
42
42
  assertPromptable
43
- } from "./index-08a5ga6n.js";
43
+ } from "./index-jw1zm273.js";
44
44
  import {
45
45
  WorkspaceExecutor,
46
46
  AppExecutor,
47
47
  LibExecutor,
48
48
  PkgExecutor
49
- } from "./index-2k0t8p3p.js";
49
+ } from "./index-va06nr10.js";
50
50
  import {
51
51
  DesktopServerStage,
52
52
  UpdateUploader
53
- } from "./index-9c3cd767.js";
53
+ } from "./index-vk0pa0mn.js";
54
+ import {
55
+ resolveMobileTargets,
56
+ resolveAppId
57
+ } from "./index-m9jj544v.js";
54
58
  import {
55
59
  NativePublicEnv,
56
60
  UpdatePackFolder,
57
61
  NativeApp
58
- } from "./index-vwmv64ad.js";
62
+ } from "./index-g1mbppa9.js";
59
63
  import {
60
64
  LibraryScript
61
- } from "./index-2wyn17fa.js";
65
+ } from "./index-pydbnfez.js";
62
66
  import {
63
67
  stripAnsi
64
68
  } from "./index-7md2g9vw.js";
65
69
  import {
66
70
  SlicePlanner,
67
71
  formatSlicePlan
68
- } from "./index-xe3x2kw5.js";
72
+ } from "./index-35hc95h5.js";
69
73
  import {
70
74
  openBrowser
71
75
  } from "./index-9dp031by.js";
72
- import {
73
- resolveMobileTargets,
74
- resolveAppId
75
- } from "./index-q958tqqg.js";
76
76
 
77
77
  // pkgs/@akanjs/cli/application/application.script.ts
78
78
  import { confirm } from "@inquirer/prompts";
@@ -196,7 +196,9 @@ var closeBunSocket = (socket, error) => {
196
196
 
197
197
  // pkgs/@akanjs/devkit/createTunnel.ts
198
198
  var createTunnel = async (service, { app, environment, port = service === "postgres" ? 5432 : 6379 }) => {
199
- const { serveDomain, repoName } = WorkspaceExecutor.getBaseDevEnv();
199
+ const baseDevEnv = WorkspaceExecutor.getBaseDevEnv();
200
+ WorkspaceExecutor.assertDeployableEnv(baseDevEnv, environment, `The ${service} tunnel`);
201
+ const { serveDomain, repoName } = baseDevEnv;
200
202
  const host = `${app.name}-${environment}.${serveDomain}`;
201
203
  const sshPort = process.env.SSH_TUNNEL_PORT ? parseInt(process.env.SSH_TUNNEL_PORT) : 32767;
202
204
  const dstHost = `${service}-0.${service}-svc.${app.name}-${environment}.svc.cluster.local`;
@@ -1894,7 +1896,7 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
1894
1896
 
1895
1897
  // pkgs/@akanjs/cli/application/application.runner.ts
1896
1898
  import { Logger as Logger3, toError } from "akanjs/common";
1897
- var loadBuildRunner = async () => (await import("./applicationBuildRunner-h0j2swx1.js")).ApplicationBuildRunner;
1899
+ var loadBuildRunner = async () => (await import("./applicationBuildRunner-dj0xkrep.js")).ApplicationBuildRunner;
1898
1900
  var loadPrompts = async () => await import("@inquirer/prompts");
1899
1901
 
1900
1902
  class ApplicationRunner extends runner("application") {
@@ -2055,7 +2057,7 @@ try {
2055
2057
  await new (await loadBuildRunner())(app).typecheck(options);
2056
2058
  }
2057
2059
  async typecheckLibrary(lib, options = {}) {
2058
- const { ProjectTypecheck } = await import("./projectTypecheck-3y7ayty0.js");
2060
+ const { ProjectTypecheck } = await import("./projectTypecheck-f534enqj.js");
2059
2061
  const root = lib.workspace.workspaceRoot;
2060
2062
  await new ProjectTypecheck(lib.cwdPath, root, { ...process.env, AKAN_WORKSPACE_ROOT: root }).run([
2061
2063
  "../../server.ts",
@@ -3633,7 +3635,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
3633
3635
  await Promise.all(shares.map(async (share) => await share.close()));
3634
3636
  }, "Abandoning the tunnel release; the shares expire on their own.");
3635
3637
  await Promise.all(apps.map(async (app) => {
3636
- const { TunnelShare } = await import("./TunnelShare-p8ymkww8.js");
3638
+ const { TunnelShare } = await import("./TunnelShare-661cxz5e.js");
3637
3639
  const share = await TunnelShare.open(app, { workspace: app.workspace });
3638
3640
  shares.push(share);
3639
3641
  urls.set(app.name, share.url);
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor
4
- } from "./index-2k0t8p3p.js";
4
+ } from "./index-va06nr10.js";
5
5
  import {
6
6
  jsonText,
7
7
  createWorkflowBaselineSummary,
8
8
  buildAkanModuleContextIndex,
9
9
  toolingRolloutGate
10
- } from "./index-dez4t5sd.js";
10
+ } from "./index-trpasv9q.js";
11
11
  import {
12
12
  buildResourceList,
13
13
  codexMcpConfigPath,
@@ -17,29 +17,29 @@ import {
17
17
  upsertCodexMcpServerBlock,
18
18
  renderDoctorText,
19
19
  AkanContextAnalyzer
20
- } from "./index-0qc5nd61.js";
20
+ } from "./index-5edzv8fn.js";
21
21
  import {
22
22
  runner
23
- } from "./index-08a5ga6n.js";
23
+ } from "./index-jw1zm273.js";
24
24
  import {
25
25
  isPlaceholderAppId
26
- } from "./index-9c3cd767.js";
26
+ } from "./index-vk0pa0mn.js";
27
+ import {
28
+ getMobileTargets,
29
+ appIdsOf
30
+ } from "./index-m9jj544v.js";
27
31
  import {
28
32
  NativeApp
29
- } from "./index-vwmv64ad.js";
33
+ } from "./index-g1mbppa9.js";
30
34
  import {
31
35
  Prompter2
32
36
  } from "./index-zzvvc845.js";
33
37
  import {
34
38
  RepairRunner
35
- } from "./index-hfqs9jvc.js";
39
+ } from "./index-j4mkhz93.js";
36
40
  import {
37
41
  WorkflowRunner
38
- } from "./index-8byzcvxp.js";
39
- import {
40
- getMobileTargets,
41
- appIdsOf
42
- } from "./index-q958tqqg.js";
42
+ } from "./index-1xj2t7cb.js";
43
43
 
44
44
  // pkgs/@akanjs/devkit/akanMcpContract.ts
45
45
  import path from "path";
@@ -127,7 +127,7 @@ var inspectAkanContextInputSchema = {
127
127
  },
128
128
  required: ["question", "draft", "review", "request"]
129
129
  };
130
- var slugPart = (value) => typeof value === "string" ? value.trim().replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase() : "";
130
+ var slugPart = (value) => typeof value === "string" ? value.trim().replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-|-$/g, "").toLowerCase() : "";
131
131
  var optionalString = (args, key) => {
132
132
  const value = args[key];
133
133
  return typeof value === "string" && value ? value : undefined;
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-08a5ga6n.js";
5
+ } from "./index-jw1zm273.js";
6
6
  import {
7
7
  ModuleExecutor
8
- } from "./index-2k0t8p3p.js";
8
+ } from "./index-va06nr10.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-dez4t5sd.js";
16
+ } from "./index-trpasv9q.js";
17
17
  import {
18
18
  PageScript
19
- } from "./index-jg3fj8h0.js";
19
+ } from "./index-86jt2a0e.js";
20
20
  import {
21
21
  pluralizeName
22
22
  } from "./index-nz8prx9g.js";
@@ -5,15 +5,15 @@ import {
5
5
  CloudApi,
6
6
  CloudUpdates,
7
7
  PipelineSecrets
8
- } from "./index-jppthsff.js";
8
+ } from "./index-cpb3nvma.js";
9
9
  import {
10
10
  WorkspaceExecutor,
11
11
  AppExecutor
12
- } from "./index-2k0t8p3p.js";
12
+ } from "./index-va06nr10.js";
13
13
  import {
14
14
  runner,
15
15
  assertPromptable
16
- } from "./index-08a5ga6n.js";
16
+ } from "./index-jw1zm273.js";
17
17
  import {
18
18
  SubspaceConfig
19
19
  } from "./index-4pf8g7ff.js";
@@ -21,6 +21,25 @@ import {
21
21
  openBrowser
22
22
  } from "./index-9dp031by.js";
23
23
 
24
+ // pkgs/@akanjs/cli/npmRegistry.ts
25
+ var defaultNpmRegistry = "https://registry.npmjs.org";
26
+ var getNpmRegistryUrl = (registryUrl = process.env.AKAN_NPM_REGISTRY ?? defaultNpmRegistry) => registryUrl.replace(/\/+$/, "");
27
+ async function getLatestPackageVersion(packageName, tag = "latest", registryUrl) {
28
+ const registry = getNpmRegistryUrl(registryUrl);
29
+ const url = `${registry}/${encodeURIComponent(packageName).replace(/^%40/, "@")}`;
30
+ const res = await fetch(url);
31
+ if (!res.ok)
32
+ throw new Error(`Failed to fetch ${packageName} metadata from ${registry}`);
33
+ const metadata = await res.json();
34
+ const version = metadata["dist-tags"]?.[tag];
35
+ if (!version)
36
+ throw new Error(`No npm dist-tag "${tag}" found for ${packageName}`);
37
+ return version;
38
+ }
39
+
40
+ // pkgs/@akanjs/cli/cloud/cloud.runner.ts
41
+ import path7 from "path";
42
+
24
43
  // pkgs/@akanjs/devkit/platformTest/PlatformTestRun.ts
25
44
  import path6 from "path";
26
45
  import chalk from "chalk";
@@ -208,11 +227,13 @@ class PlatformTestTarget {
208
227
  const install = await this.exec("bun install --frozen-lockfile", logPath, PlatformTestTarget.installIdleMs);
209
228
  if (install.exitCode === 0)
210
229
  return;
211
- const failedScripts = [...install.output.matchAll(/(?:pre|post)?install script from "([^"]+)" exited/g)].map((match) => match[1] ?? "");
212
- const tolerable = failedScripts.length > 0 && failedScripts.every((pkg) => this.tolerateScriptFailures.includes(pkg));
230
+ const failedPackages = [
231
+ ...install.output.matchAll(/(?:pre|post)?install script from "([^"]+)" exited|failed to link binaries for package: (@?[^@\s]+)@/g)
232
+ ].map((match) => match[1] ?? match[2] ?? "");
233
+ const tolerable = failedPackages.length > 0 && failedPackages.every((pkg) => this.tolerateScriptFailures.includes(pkg));
213
234
  if (!tolerable)
214
235
  throw new Error(`bun install failed \u2014 see ${logPath}`);
215
- envWarnings.push(`install script failed for ${failedScripts.join(", ")} \u2014 tolerated on ${this.platform}`);
236
+ envWarnings.push(`install failed for ${failedPackages.join(", ")} \u2014 tolerated on ${this.platform}`);
216
237
  const relink = await this.exec("bun install --frozen-lockfile --ignore-scripts", this.#logPath(context, "install-relink"), PlatformTestTarget.installIdleMs);
217
238
  if (relink.exitCode !== 0)
218
239
  throw new Error(`bun install --ignore-scripts failed \u2014 see ${logPath}`);
@@ -249,7 +270,7 @@ class LinuxDockerTarget extends PlatformTestTarget {
249
270
  }
250
271
  static dockerfile = [
251
272
  `FROM oven/bun:${Bun.version}-slim`,
252
- "RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates procps lsof && rm -rf /var/lib/apt/lists/*"
273
+ "RUN sed -i 's|http://|https://|g' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y --no-install-recommends git ca-certificates procps lsof && rm -rf /var/lib/apt/lists/*"
253
274
  ].join(`
254
275
  `);
255
276
  get image() {
@@ -412,7 +433,7 @@ import path5 from "path";
412
433
  class WindowsSshTarget extends PlatformTestTarget {
413
434
  static utmctlPath = "/Applications/UTM.app/Contents/MacOS/utmctl";
414
435
  static defaultWorkRoot = "C:\\akan-test";
415
- static defaultTolerateScriptFailures = ["sharp", "puppeteer"];
436
+ static defaultTolerateScriptFailures = ["sharp", "puppeteer", "msgpackr"];
416
437
  static #runDirPattern = "^\\d{8}-\\d{6}$";
417
438
  static #keptRuns = 2;
418
439
  platform = "windows";
@@ -653,29 +674,10 @@ class PlatformTestRun {
653
674
  }
654
675
 
655
676
  // pkgs/@akanjs/cli/cloud/cloud.runner.ts
656
- import path7 from "path";
657
677
  import { confirm, input, select } from "@inquirer/prompts";
658
678
  import { Logger, sleep } from "akanjs/common";
659
679
  import chalk2 from "chalk";
660
680
  import * as QRcode from "qrcode";
661
-
662
- // pkgs/@akanjs/cli/npmRegistry.ts
663
- var defaultNpmRegistry = "https://registry.npmjs.org";
664
- var getNpmRegistryUrl = (registryUrl = process.env.AKAN_NPM_REGISTRY ?? defaultNpmRegistry) => registryUrl.replace(/\/+$/, "");
665
- async function getLatestPackageVersion(packageName, tag = "latest", registryUrl) {
666
- const registry = getNpmRegistryUrl(registryUrl);
667
- const url = `${registry}/${encodeURIComponent(packageName).replace(/^%40/, "@")}`;
668
- const res = await fetch(url);
669
- if (!res.ok)
670
- throw new Error(`Failed to fetch ${packageName} metadata from ${registry}`);
671
- const metadata = await res.json();
672
- const version = metadata["dist-tags"]?.[tag];
673
- if (!version)
674
- throw new Error(`No npm dist-tag "${tag}" found for ${packageName}`);
675
- return version;
676
- }
677
-
678
- // pkgs/@akanjs/cli/cloud/cloud.runner.ts
679
681
  var addRemoteEnvServerValue = "__addRemoteEnvServer";
680
682
  var removeRemoteEnvServerValue = "__removeRemoteEnvServer";
681
683