@akanjs/cli 3.1.1-rc.5 → 3.1.1-rc.7

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 (73) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-8hfzq1zs.js → CodeAgent-3sy7kjgj.js} +2 -2
  3. package/{CodeTui-kj6ng91g.js → CodeTui-rqxarxsn.js} +1 -1
  4. package/TunnelShare-q38dxrrr.js +14 -0
  5. package/{agent.command-2gay26y4.js → agent.command-ydftceda.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-a3aepayy.js → application.command-fm2yn6hj.js} +9 -9
  8. package/{applicationBuildRunner-xye2sqrm.js → applicationBuildRunner-t2r84sz6.js} +72 -26
  9. package/buildBatch.proc.js +5 -5
  10. package/{cloud.command-10j4z1cy.js → cloud.command-ya0evzfq.js} +22 -17
  11. package/cloud.script-zg43jse2.js +24 -0
  12. package/{code.command-184jfjtk.js → code.command-719k3e9q.js} +6 -6
  13. package/{context.command-kx0kzz3t.js → context.command-c4t4z1vy.js} +16 -16
  14. package/context.runner-qb15sjf8.js +25 -0
  15. package/{guideline.command-72psmnpx.js → guideline.command-snh85ctf.js} +2 -2
  16. package/guidelines/agentRule/agentRule.instruction.md +5 -2
  17. package/guidelines/conventions/conventions.instruction.md +10 -7
  18. package/guidelines/pageRule/pageRule.instruction.md +8 -0
  19. package/guidelines/queryRule/queryRule.instruction.md +7 -0
  20. package/guidelines/runtimeRule/runtimeRule.instruction.md +12 -0
  21. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +2 -1
  22. package/incrementalBuilder.proc.js +3 -3
  23. package/{index-0fpeb7x7.js → index-0fz95kxe.js} +1 -1
  24. package/{index-sxqjxb4j.js → index-2xcc2ax5.js} +2 -2
  25. package/{index-md6026rp.js → index-31es1yev.js} +24 -2
  26. package/{index-azrhhgtb.js → index-3wypz6xj.js} +59 -8
  27. package/{index-kb51mayy.js → index-40brg4px.js} +3 -3
  28. package/{index-mtf0cx8t.js → index-42j4a8zq.js} +2 -2
  29. package/{index-qp73c26e.js → index-4vgbysa0.js} +3 -3
  30. package/{index-s28awecf.js → index-5max10jx.js} +536 -140
  31. package/{index-bxjacq5c.js → index-5phjb48k.js} +3 -3
  32. package/{index-5anqj3bm.js → index-74tjjsnc.js} +4 -4
  33. package/{index-v1gz5vja.js → index-8ap5z1n5.js} +1 -1
  34. package/{index-hqaa4y3y.js → index-8w76g4rm.js} +10 -10
  35. package/{index-q0e6604h.js → index-905qdgqp.js} +1 -1
  36. package/{index-0dnv1039.js → index-b70zct19.js} +7 -7
  37. package/{index-eyhqttvh.js → index-espk51ah.js} +2 -2
  38. package/{index-3wfw8jb8.js → index-hmt54t45.js} +4 -4
  39. package/{index-rvqk63qp.js → index-hqegmnb5.js} +56 -9
  40. package/{index-zz5731qs.js → index-j9vyj3dj.js} +3 -3
  41. package/{index-b2hkbyf0.js → index-jh72e64b.js} +44 -3
  42. package/{index-jn8gfj2b.js → index-pbtzb54h.js} +17 -15
  43. package/{index-yaz7yks8.js → index-pcwzkdqb.js} +1 -1
  44. package/{index-xhnw8n74.js → index-qd5km521.js} +4 -97
  45. package/{index-4q1amb3p.js → index-skk9zc1x.js} +2 -2
  46. package/{index-ggfjqpp4.js → index-vah0fgkr.js} +1 -1
  47. package/{index-trjhp735.js → index-wcej7g4z.js} +5 -5
  48. package/{index-4g6te8sa.js → index-xb8809yb.js} +2 -2
  49. package/{index-9z37veck.js → index-xjf5j657.js} +1 -1
  50. package/{index-hrc7q2e6.js → index-xy97mqgq.js} +35 -4
  51. package/{index-ssseyt0n.js → index-zrte51fn.js} +4 -4
  52. package/index.js +22 -22
  53. package/{library.command-tnxw0yb4.js → library.command-gycrwhf1.js} +3 -3
  54. package/{localRegistry.command-xw0c03g4.js → localRegistry.command-h924ek5g.js} +12 -12
  55. package/{module.command-8pjk6vmm.js → module.command-v6hgs1bc.js} +5 -5
  56. package/{package.command-b831nx2n.js → package.command-shzpcfph.js} +3 -3
  57. package/package.json +2 -2
  58. package/{page.command-earjccmn.js → page.command-ptxn5kqk.js} +3 -3
  59. package/{pipeline.command-yt8bq91c.js → pipeline.command-zz31pgax.js} +2 -2
  60. package/{primitive.command-8dw8ra1x.js → primitive.command-a1vse91z.js} +6 -6
  61. package/{projectTypecheck-btbw3nyf.js → projectTypecheck-2ztky9cf.js} +1 -1
  62. package/{quality.command-j2c4a2zg.js → quality.command-ah8qcakd.js} +2 -2
  63. package/{repair.command-7jv7bgc4.js → repair.command-cvazbz99.js} +5 -5
  64. package/{scalar.command-vwjk94zr.js → scalar.command-0acvyp26.js} +4 -4
  65. package/{subspace.command-fwzrs526.js → subspace.command-vem71tr5.js} +8 -8
  66. package/templates/app/tsconfig.json.template +2 -7
  67. package/templates/workspaceRoot/bunfig.toml.template +0 -4
  68. package/{tunnel.command-zm29dgkr.js → tunnel.command-vy08ecyp.js} +7 -7
  69. package/{workflow.command-nyjc1mxx.js → workflow.command-abb1d5xy.js} +10 -10
  70. package/{workspace.command-mkqtxg1x.js → workspace.command-fmgycnbr.js} +24 -24
  71. package/TunnelShare-ycmz33ve.js +0 -14
  72. package/cloud.script-qb9jfncf.js +0 -24
  73. package/context.runner-d7dhvbc7.js +0 -25
@@ -5,7 +5,7 @@ import {
5
5
  McpServerConfig,
6
6
  McpSignIn,
7
7
  AkanCodeCompaction2
8
- } from "./index-v1gz5vja.js";
8
+ } from "./index-8ap5z1n5.js";
9
9
  import {
10
10
  stripAnsi
11
11
  } from "./index-7md2g9vw.js";
@@ -809,7 +809,7 @@ class AkanToolPack2 {
809
809
  return { name: "akan-tools", factory: async (pi) => await this.#register(pi) };
810
810
  }
811
811
  async names() {
812
- const { ContextRunner } = await import("./context.runner-d7dhvbc7.js");
812
+ const { ContextRunner } = await import("./context.runner-qb15sjf8.js");
813
813
  return [
814
814
  ...new ContextRunner().listMcpTools(this.#options.mode).map((tool) => tool.name),
815
815
  AkanToolPack2.verifyToolName
@@ -817,7 +817,7 @@ class AkanToolPack2 {
817
817
  }
818
818
  static verifyToolName = "akan_verify";
819
819
  async#register(pi) {
820
- const { ContextRunner } = await import("./context.runner-d7dhvbc7.js");
820
+ const { ContextRunner } = await import("./context.runner-qb15sjf8.js");
821
821
  const runner = new ContextRunner;
822
822
  const guidelineNames = await AkanToolPack2.#guidelineNames();
823
823
  for (const tool of runner.listMcpTools(this.#options.mode, { guidelineNames })) {
@@ -1,12 +1,12 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-azrhhgtb.js";
4
+ } from "./index-3wypz6xj.js";
5
5
  import {
6
6
  AppExecutor,
7
7
  LibExecutor,
8
8
  ModuleExecutor
9
- } from "./index-trjhp735.js";
9
+ } from "./index-wcej7g4z.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-9z37veck.js";
44
+ } from "./index-xjf5j657.js";
45
45
  import {
46
46
  ModuleScript
47
- } from "./index-3wfw8jb8.js";
47
+ } from "./index-hmt54t45.js";
48
48
 
49
49
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
50
50
  import { capitalize, lowerlize } from "akanjs/common";
@@ -179,7 +179,7 @@ class SubagentPool2 {
179
179
  }
180
180
  }
181
181
  async#run(id, kind, prompt, signal) {
182
- const { CodeAgent } = await import("./CodeAgent-8hfzq1zs.js");
182
+ const { CodeAgent } = await import("./CodeAgent-3sy7kjgj.js");
183
183
  const budget = this.#options.parent.tools.subagent;
184
184
  const child = SubagentPool2.childOf(this.#options.parent, kind);
185
185
  const agent = await CodeAgent.create({
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor
4
- } from "./index-trjhp735.js";
4
+ } from "./index-wcej7g4z.js";
5
5
  import {
6
6
  jsonText,
7
7
  createWorkflowBaselineSummary,
8
8
  buildAkanModuleContextIndex,
9
9
  toolingRolloutGate
10
- } from "./index-9z37veck.js";
10
+ } from "./index-xjf5j657.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-md6026rp.js";
20
+ } from "./index-31es1yev.js";
21
21
  import {
22
22
  runner
23
- } from "./index-azrhhgtb.js";
23
+ } from "./index-3wypz6xj.js";
24
+ import {
25
+ NativeApp
26
+ } from "./index-5max10jx.js";
24
27
  import {
25
28
  isPlaceholderAppId
26
- } from "./index-xhnw8n74.js";
29
+ } from "./index-qd5km521.js";
27
30
  import {
28
31
  getMobileTargets,
29
32
  appIdsOf
30
33
  } from "./index-m9jj544v.js";
31
- import {
32
- NativeApp
33
- } from "./index-s28awecf.js";
34
34
  import {
35
35
  Prompter2
36
36
  } from "./index-zzvvc845.js";
37
37
  import {
38
38
  RepairRunner
39
- } from "./index-zz5731qs.js";
39
+ } from "./index-j9vyj3dj.js";
40
40
  import {
41
41
  WorkflowRunner
42
- } from "./index-0dnv1039.js";
42
+ } from "./index-b70zct19.js";
43
43
 
44
44
  // pkgs/@akanjs/devkit/akanMcpContract.ts
45
45
  import path from "path";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-azrhhgtb.js";
5
+ } from "./index-3wypz6xj.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/page/page.runner.ts
8
8
  class PageRunner extends runner("page") {
@@ -22,26 +22,26 @@ import {
22
22
  renderWorkflowApply,
23
23
  renderWorkflowValidation,
24
24
  renderWorkflowRunArtifact
25
- } from "./index-9z37veck.js";
25
+ } from "./index-xjf5j657.js";
26
26
  import {
27
27
  AkanContextAnalyzer
28
- } from "./index-md6026rp.js";
28
+ } from "./index-31es1yev.js";
29
29
  import {
30
30
  CommandContainer,
31
31
  runner
32
- } from "./index-azrhhgtb.js";
32
+ } from "./index-3wypz6xj.js";
33
33
  import {
34
34
  ModuleScript
35
- } from "./index-3wfw8jb8.js";
35
+ } from "./index-hmt54t45.js";
36
36
  import {
37
37
  PrimitiveScript
38
- } from "./index-5anqj3bm.js";
38
+ } from "./index-74tjjsnc.js";
39
39
  import {
40
40
  spawnShell
41
- } from "./index-zz5731qs.js";
41
+ } from "./index-j9vyj3dj.js";
42
42
  import {
43
43
  ScalarScript
44
- } from "./index-4q1amb3p.js";
44
+ } from "./index-skk9zc1x.js";
45
45
 
46
46
  // pkgs/@akanjs/cli/workflow/workflow.runner.ts
47
47
  import { mkdir, readFile, writeFile } from "fs/promises";
@@ -19,11 +19,11 @@ import {
19
19
  CsrDevPaths,
20
20
  PagesEntrySourceGenerator,
21
21
  PagesBundleBuilder
22
- } from "./index-0fpeb7x7.js";
22
+ } from "./index-0fz95kxe.js";
23
23
  import {
24
24
  AsyncDefaultExportDetector,
25
25
  resolveSsrPageEntriesForApp
26
- } from "./index-trjhp735.js";
26
+ } from "./index-wcej7g4z.js";
27
27
 
28
28
  // pkgs/@akanjs/devkit/frontendBuild/autoImportSync.ts
29
29
  import { readdir, readFile, stat } from "fs/promises";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-azrhhgtb.js";
5
+ } from "./index-3wypz6xj.js";
6
6
  import {
7
7
  ModuleExecutor
8
- } from "./index-trjhp735.js";
8
+ } from "./index-wcej7g4z.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-9z37veck.js";
16
+ } from "./index-xjf5j657.js";
17
17
  import {
18
18
  PageScript
19
- } from "./index-q0e6604h.js";
19
+ } from "./index-905qdgqp.js";
20
20
  import {
21
21
  pluralizeName
22
22
  } from "./index-nz8prx9g.js";
@@ -4,26 +4,27 @@ import {
4
4
  CloudApi,
5
5
  CloudUpdates,
6
6
  PipelineSecrets
7
- } from "./index-hrc7q2e6.js";
7
+ } from "./index-xy97mqgq.js";
8
8
  import {
9
9
  PkgExecutor
10
- } from "./index-trjhp735.js";
10
+ } from "./index-wcej7g4z.js";
11
11
  import {
12
+ UpdatePackFolder,
12
13
  NativePublicEnv,
13
- UpdatePackFolder
14
- } from "./index-s28awecf.js";
14
+ NativeApp
15
+ } from "./index-5max10jx.js";
15
16
  import {
16
17
  script
17
- } from "./index-azrhhgtb.js";
18
+ } from "./index-3wypz6xj.js";
18
19
  import {
19
20
  ApplicationScript
20
- } from "./index-jn8gfj2b.js";
21
+ } from "./index-pbtzb54h.js";
21
22
  import {
22
23
  PackageScript
23
- } from "./index-mtf0cx8t.js";
24
+ } from "./index-42j4a8zq.js";
24
25
  import {
25
26
  CloudRunner
26
- } from "./index-b2hkbyf0.js";
27
+ } from "./index-jh72e64b.js";
27
28
 
28
29
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
29
30
  import { Logger } from "akanjs/common";
@@ -93,6 +94,7 @@ class CloudScript2 extends script("cloud", [CloudRunner, ApplicationScript, Pack
93
94
  }
94
95
  async pushUpdate(workspace, app, {
95
96
  platform,
97
+ arch = null,
96
98
  target,
97
99
  env,
98
100
  channel,
@@ -104,6 +106,22 @@ class CloudScript2 extends script("cloud", [CloudRunner, ApplicationScript, Pack
104
106
  pack: packDir,
105
107
  publicEnv
106
108
  }) {
109
+ if (platform && platform !== "ios" && platform !== "android") {
110
+ if (packDir || publicEnv)
111
+ throw new Error("--pack and --public-env take a phone's web bundle; a desktop release goes up as `akan publish-update` wrote it.");
112
+ return await this.#pushRelease(workspace, app, platform, {
113
+ arch,
114
+ target,
115
+ env: env ?? "main",
116
+ channel,
117
+ notes,
118
+ subspace,
119
+ given,
120
+ allowLocalRelease
121
+ });
122
+ }
123
+ if (arch)
124
+ throw new Error("--arch picks a desktop release's CPU; a phone's update is its web bundle.");
107
125
  if (packDir && publicEnv)
108
126
  throw new Error("--public-env picks what a pack is built with, and --pack uploads one already built: give one.");
109
127
  const devProjectId = await this.cloudRunner.projectOf(workspace, subspace, app.name);
@@ -116,6 +134,35 @@ class CloudScript2 extends script("cloud", [CloudRunner, ApplicationScript, Pack
116
134
  notes
117
135
  });
118
136
  }
137
+ async#pushRelease(workspace, app, platform, {
138
+ arch,
139
+ target,
140
+ env,
141
+ channel,
142
+ notes,
143
+ subspace,
144
+ given,
145
+ allowLocalRelease
146
+ }) {
147
+ const hostArch = process.arch === "arm64" || process.arch === "x64" ? process.arch : null;
148
+ const cpu = arch ?? hostArch;
149
+ if (!cpu)
150
+ throw new Error(`This computer's CPU is ${process.arch}: name the release's with --arch arm64 or x64.`);
151
+ if (env === "local" && !allowLocalRelease)
152
+ throw new Error("A release with --env local is blocked. Pass --allow-local-release only for explicit local release testing.");
153
+ const devProjectId = await this.cloudRunner.projectOf(workspace, subspace, app.name);
154
+ const read = await this.cloudRunner.readRelease(app, {
155
+ platform: platform === "desktop" ? NativeApp.desktopPlatform() : platform,
156
+ arch: cpu,
157
+ target,
158
+ env,
159
+ channel
160
+ });
161
+ return await this.cloudRunner.pushRelease(await this.#cloudApi(workspace, given), devProjectId, app, {
162
+ ...read,
163
+ notes
164
+ });
165
+ }
119
166
  async#packToPush(app, {
120
167
  platform,
121
168
  target,
@@ -128,7 +175,7 @@ class CloudScript2 extends script("cloud", [CloudRunner, ApplicationScript, Pack
128
175
  if (packDir)
129
176
  return await this.cloudRunner.readPack(app, packDir, { platform, target, env, allowLocalRelease });
130
177
  if (!platform)
131
- throw new Error("push-update needs --platform ios or android to pack, or --pack <dir> to upload what `akan pack-update` wrote.");
178
+ throw new Error("push-update needs --platform ios or android to pack, or --pack <dir> to upload what `akan pack-update` wrote, or --platform desktop for the release `akan publish-update` wrote.");
132
179
  return await this.applicationScript.packUpdate(app, platform, {
133
180
  target: target ?? undefined,
134
181
  env: env ?? "main",
@@ -5,13 +5,13 @@ import {
5
5
  writeGeneratedSyncState,
6
6
  createRepairReport,
7
7
  renderRepairReport
8
- } from "./index-9z37veck.js";
8
+ } from "./index-xjf5j657.js";
9
9
  import {
10
10
  AkanContextAnalyzer
11
- } from "./index-md6026rp.js";
11
+ } from "./index-31es1yev.js";
12
12
  import {
13
13
  runner
14
- } from "./index-azrhhgtb.js";
14
+ } from "./index-3wypz6xj.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], {
@@ -6,15 +6,21 @@ import {
6
6
  CloudApi,
7
7
  CloudUpdates,
8
8
  PipelineSecrets
9
- } from "./index-hrc7q2e6.js";
9
+ } from "./index-xy97mqgq.js";
10
+ import {
11
+ resolveMobileTargets
12
+ } from "./index-m9jj544v.js";
10
13
  import {
11
14
  WorkspaceExecutor,
12
15
  AppExecutor
13
- } from "./index-trjhp735.js";
16
+ } from "./index-wcej7g4z.js";
17
+ import {
18
+ NativeApp
19
+ } from "./index-5max10jx.js";
14
20
  import {
15
21
  runner,
16
22
  assertPromptable
17
- } from "./index-azrhhgtb.js";
23
+ } from "./index-3wypz6xj.js";
18
24
  import {
19
25
  SubspaceConfig
20
26
  } from "./index-4pf8g7ff.js";
@@ -1242,6 +1248,41 @@ ${run.format(results)}
1242
1248
  async pushUpdate(cloudApi, devProjectId, pack, options) {
1243
1249
  return await new CloudUpdates(cloudApi, devProjectId).push(pack, options);
1244
1250
  }
1251
+ async readRelease(app, {
1252
+ platform,
1253
+ arch,
1254
+ target,
1255
+ env,
1256
+ channel
1257
+ }) {
1258
+ const targets = await resolveMobileTargets(app, target ?? undefined);
1259
+ const [mobileTarget] = targets;
1260
+ if (!mobileTarget || targets.length > 1)
1261
+ throw new Error("push-update uploads one native target's release at a time; pass --target <name>.");
1262
+ const { release, url, exeName } = await new NativeApp(app, mobileTarget, env).publishedRelease(platform, {
1263
+ arch,
1264
+ channel
1265
+ });
1266
+ const { signer, unread } = await release.signer({ exeName });
1267
+ if (unread)
1268
+ app.logger.warn(`release.json names no signer: ${unread}.`);
1269
+ return { release, url, signer, target: mobileTarget.name };
1270
+ }
1271
+ async pushRelease(cloudApi, devProjectId, app, {
1272
+ release,
1273
+ url,
1274
+ signer,
1275
+ target,
1276
+ notes
1277
+ }) {
1278
+ return await new CloudUpdates(cloudApi, devProjectId).pushRelease(release, {
1279
+ appName: app.name,
1280
+ target,
1281
+ notes,
1282
+ signer,
1283
+ url
1284
+ });
1285
+ }
1245
1286
  async registerBinary(cloudApi, devProjectId, app, pack, options) {
1246
1287
  return await new CloudUpdates(cloudApi, devProjectId).registerBinary(app, pack, options);
1247
1288
  }
@@ -41,7 +41,7 @@ import {
41
41
  script,
42
42
  markCliErrorPrinted,
43
43
  assertPromptable
44
- } from "./index-azrhhgtb.js";
44
+ } from "./index-3wypz6xj.js";
45
45
  import {
46
46
  AppInfo,
47
47
  CommandExecutionError,
@@ -50,30 +50,30 @@ import {
50
50
  AppExecutor,
51
51
  LibExecutor,
52
52
  PkgExecutor
53
- } from "./index-trjhp735.js";
53
+ } from "./index-wcej7g4z.js";
54
54
  import {
55
- DesktopServerStage,
56
- UpdateUploader
57
- } from "./index-xhnw8n74.js";
55
+ UpdatePackFolder,
56
+ UpdateUploader,
57
+ NativePublicEnv,
58
+ NativeApp
59
+ } from "./index-5max10jx.js";
60
+ import {
61
+ DesktopServerStage
62
+ } from "./index-qd5km521.js";
58
63
  import {
59
64
  resolveMobileTargets,
60
65
  resolveAppId
61
66
  } from "./index-m9jj544v.js";
62
- import {
63
- NativePublicEnv,
64
- UpdatePackFolder,
65
- NativeApp
66
- } from "./index-s28awecf.js";
67
67
  import {
68
68
  LibraryScript
69
- } from "./index-sxqjxb4j.js";
69
+ } from "./index-2xcc2ax5.js";
70
70
  import {
71
71
  stripAnsi
72
72
  } from "./index-7md2g9vw.js";
73
73
  import {
74
74
  SlicePlanner,
75
75
  formatSlicePlan
76
- } from "./index-yaz7yks8.js";
76
+ } from "./index-pcwzkdqb.js";
77
77
  import {
78
78
  openBrowser
79
79
  } from "./index-9dp031by.js";
@@ -1900,7 +1900,7 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
1900
1900
 
1901
1901
  // pkgs/@akanjs/cli/application/application.runner.ts
1902
1902
  import { Logger as Logger3, toError } from "akanjs/common";
1903
- var loadBuildRunner = async () => (await import("./applicationBuildRunner-xye2sqrm.js")).ApplicationBuildRunner;
1903
+ var loadBuildRunner = async () => (await import("./applicationBuildRunner-t2r84sz6.js")).ApplicationBuildRunner;
1904
1904
  var loadPrompts = async () => await import("@inquirer/prompts");
1905
1905
 
1906
1906
  class ApplicationRunner extends runner("application") {
@@ -2101,7 +2101,7 @@ if (loaded) process.exitCode = await loaded.migrations.command(loaded.server, ar
2101
2101
  await new (await loadBuildRunner())(app).typecheck(options);
2102
2102
  }
2103
2103
  async typecheckLibrary(lib, options = {}) {
2104
- const { ProjectTypecheck } = await import("./projectTypecheck-btbw3nyf.js");
2104
+ const { ProjectTypecheck } = await import("./projectTypecheck-2ztky9cf.js");
2105
2105
  const root = lib.workspace.workspaceRoot;
2106
2106
  await new ProjectTypecheck(lib.cwdPath, root, { ...process.env, AKAN_WORKSPACE_ROOT: root }).run([
2107
2107
  "../../server.ts",
@@ -2309,6 +2309,8 @@ if (loaded) process.exitCode = await loaded.migrations.command(loaded.server, ar
2309
2309
  const { publicKey, keyId, keyPath, created } = await new NativeApp(app, mobileTarget).updateKeygen(nativePlatform);
2310
2310
  app.log(`${appId}: ${created ? "made" : "read"} ${keyPath}${created ? " (keep it private and backed up: without it, installed apps take no more updates)" : ""}`);
2311
2311
  app.log(` native: { updates: { url: "https://\u2026/${app.name}", publicKeys: [${JSON.stringify(publicKey)}] } }`);
2312
+ if (platform === "desktop")
2313
+ app.log(" url: hosted on Akan Cloud, register this public key as an external key on the release screen and use the URL it gives; self-hosted, the public address you upload the release to");
2312
2314
  app.log(` keyId ${keyId}: what publish-update --revoke and updates.revokedKeys name this key by`);
2313
2315
  const { publicKey: one, publicKeys } = mobileTarget.config.updates ?? {};
2314
2316
  const declared = publicKeys ?? (one ? [one] : null);
@@ -3706,7 +3708,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
3706
3708
  await Promise.all(shares.map(async (share) => await share.close()));
3707
3709
  }, "Abandoning the tunnel release; the shares expire on their own.");
3708
3710
  await Promise.all(apps.map(async (app) => {
3709
- const { TunnelShare } = await import("./TunnelShare-ycmz33ve.js");
3711
+ const { TunnelShare } = await import("./TunnelShare-q38dxrrr.js");
3710
3712
  const share = await TunnelShare.open(app, { workspace: app.workspace });
3711
3713
  shares.push(share);
3712
3714
  urls.set(app.name, share.url);
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  AppInfo
4
- } from "./index-trjhp735.js";
4
+ } from "./index-wcej7g4z.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/slicePlanner.ts
7
7
  class SlicePlanner {
@@ -1,8 +1,7 @@
1
1
  // @bun
2
2
  import {
3
- DesktopBin,
4
- UpdatePackFolder
5
- } from "./index-s28awecf.js";
3
+ DesktopBin
4
+ } from "./index-5max10jx.js";
6
5
  // pkgs/@akanjs/devkit/mobile/desktopServerStage.ts
7
6
  import { cp, mkdir, readdir, rm, writeFile } from "fs/promises";
8
7
  import path from "path";
@@ -12,6 +11,7 @@ class DesktopServerStage {
12
11
  static uncarried = new Set([
13
12
  "Dockerfile",
14
13
  "package.json",
14
+ "bun.lock",
15
15
  "rscWorker.js",
16
16
  "console.js",
17
17
  "console-runtime.js",
@@ -145,97 +145,4 @@ var isPlaceholderAppId = (appId) => {
145
145
  return true;
146
146
  return normalized.split(".").some((segment) => placeholderAppIdSegment.test(segment));
147
147
  };
148
- // pkgs/@akanjs/devkit/mobile/updateUploader.ts
149
- import { readdir as readdir2 } from "fs/promises";
150
- import path2 from "path";
151
- import { isRecord, trimTrailingSlashes } from "akanjs/common";
152
- class UpdateUploader {
153
- bucket;
154
- prefix;
155
- static #manifest = /\.json(?:\.sig)?$/;
156
- static parseTarget(target) {
157
- const match = /^s3:\/\/([^/]+)(?:\/(.*))?$/.exec(target.trim());
158
- if (!match?.[1])
159
- throw new Error(`--upload takes s3://<bucket>/<prefix>, not ${JSON.stringify(target)}.`);
160
- return { bucket: match[1], prefix: trimTrailingSlashes(match[2] ?? "") };
161
- }
162
- static order(files) {
163
- const manifests = files.filter((file) => UpdateUploader.#manifest.test(file));
164
- return {
165
- releases: files.filter((file) => !UpdateUploader.#manifest.test(file)).sort((a, b) => a.localeCompare(b)),
166
- manifests: manifests.sort((a, b) => Number(a.endsWith(".json")) - Number(b.endsWith(".json")) || a.localeCompare(b))
167
- };
168
- }
169
- static async releaseFiles(updatesDir, { dir, channel, bundle }) {
170
- const keyOf = (file) => UpdateUploader.#keyOf(updatesDir, dir, file);
171
- const desktop = await UpdateUploader.#read(path2.join(dir, `${channel}.json`));
172
- if (desktop?.bundle === bundle) {
173
- const archive = desktop.archive?.url;
174
- const patches = UpdateUploader.#field(desktop.patches, "url");
175
- return [archive, ...patches, `${channel}.json.sig`, `${channel}.json`].map(keyOf);
176
- }
177
- const names = await readdir2(path2.join(dir, channel)).catch(() => []);
178
- for (const name of names.filter((name) => name.endsWith(".json"))) {
179
- const envelope = await UpdateUploader.#read(path2.join(dir, channel, name));
180
- const manifest = typeof envelope?.manifest === "string" ? UpdateUploader.#parse(Buffer.from(envelope.manifest, "base64").toString("utf8")) : null;
181
- if (manifest?.bundle !== bundle)
182
- continue;
183
- const hashes = [...new Set(UpdateUploader.#field(manifest.files, "sha256"))];
184
- if (!hashes.every((hash) => typeof hash === "string" && /^[0-9a-f]{64}$/.test(hash)))
185
- throw new Error(`${path2.join(dir, channel, name)} lists a file whose sha256 is not 64 hex digits; nothing was uploaded.`);
186
- return [...hashes.map((hash) => `${UpdatePackFolder.filesDir}/${hash}`), `${channel}/${name}`].map(keyOf);
187
- }
188
- throw new Error(`${dir} holds no ${channel} manifest of release ${bundle}; nothing was uploaded.`);
189
- }
190
- static #keyOf(updatesDir, dir, file) {
191
- const resolved = typeof file === "string" ? path2.resolve(dir, file) : "";
192
- const key = path2.relative(updatesDir, resolved);
193
- if (!resolved.startsWith(`${path2.resolve(dir)}${path2.sep}`) || key.startsWith("..") || path2.isAbsolute(key))
194
- throw new Error(`The release in ${dir} names ${typeof file === "string" ? JSON.stringify(file) : "a file with no path"}, which is not inside that folder; nothing was uploaded.`);
195
- return key.split(path2.sep).join("/");
196
- }
197
- static #field(list, key) {
198
- return Array.isArray(list) ? list.map((item) => isRecord(item) ? item[key] : undefined) : [];
199
- }
200
- static async#read(file) {
201
- const text = await Bun.file(file).text().catch(() => "");
202
- return UpdateUploader.#parse(text);
203
- }
204
- static #parse(text) {
205
- try {
206
- const value = JSON.parse(text);
207
- return isRecord(value) ? value : null;
208
- } catch {
209
- return null;
210
- }
211
- }
212
- constructor(bucket, prefix) {
213
- this.bucket = bucket;
214
- this.prefix = prefix;
215
- }
216
- static forTarget(target) {
217
- const { bucket, prefix } = UpdateUploader.parseTarget(target);
218
- return new UpdateUploader(new Bun.S3Client({ bucket }), prefix);
219
- }
220
- async upload(updatesDir, release) {
221
- const { releases, manifests } = UpdateUploader.order(await UpdateUploader.releaseFiles(updatesDir, release));
222
- const keyOf = (file) => this.prefix ? `${this.prefix}/${file}` : file;
223
- let uploaded = 0;
224
- let skipped = 0;
225
- for (const file of releases) {
226
- if (await this.bucket.exists(keyOf(file))) {
227
- skipped++;
228
- continue;
229
- }
230
- await this.bucket.write(keyOf(file), Bun.file(path2.join(updatesDir, file)));
231
- uploaded++;
232
- }
233
- for (const file of manifests) {
234
- const type = file.endsWith(".json") ? "application/json" : "text/plain";
235
- await this.bucket.write(keyOf(file), Bun.file(path2.join(updatesDir, file)), { type });
236
- uploaded++;
237
- }
238
- return { uploaded, skipped };
239
- }
240
- }
241
- export { DesktopServerStage, isPlaceholderAppId, UpdateUploader };
148
+ export { DesktopServerStage, isPlaceholderAppId };
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-azrhhgtb.js";
5
+ } from "./index-3wypz6xj.js";
6
6
  import {
7
7
  generatedFilesForSync,
8
8
  createPassedPrimitiveReport,
9
9
  scalarChangedFiles
10
- } from "./index-9z37veck.js";
10
+ } from "./index-xjf5j657.js";
11
11
  import {
12
12
  pluralizeName
13
13
  } from "./index-nz8prx9g.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  GlobalConfig,
4
4
  CloudApi
5
- } from "./index-hrc7q2e6.js";
5
+ } from "./index-xy97mqgq.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/tunnel/TunnelShare.ts
8
8
  import { TunnelAgent } from "akanjs/server/tunnel";
@@ -997,10 +997,10 @@ class AkanAppConfig {
997
997
  ...this.web.csr ? {} : { AKAN_CSR: "false" }
998
998
  };
999
999
  }
1000
- dockerfileFor(environment) {
1001
- return this.#makeDockerfile(environment);
1000
+ dockerfileFor(environment, { lockfile = true } = {}) {
1001
+ return this.#makeDockerfile(environment, lockfile);
1002
1002
  }
1003
- #makeDockerfile(environment) {
1003
+ #makeDockerfile(environment, lockfile = true) {
1004
1004
  if (typeof this.docker === "string")
1005
1005
  return this.docker;
1006
1006
  const { image, preRuns, postRuns, command } = this.docker;
@@ -1016,8 +1016,8 @@ ${preRunScripts.join(`
1016
1016
  `)}
1017
1017
  RUN mkdir -p /workspace
1018
1018
  WORKDIR /workspace
1019
- COPY ./package.json ./package.json
1020
- RUN bun install --production
1019
+ ${lockfile ? "COPY ./package.json ./bun.lock ./" : "COPY ./package.json ./package.json"}
1020
+ RUN bun install --production${lockfile ? " --frozen-lockfile" : ""}
1021
1021
  ${postRunScripts.join(`
1022
1022
  `)}
1023
1023
  COPY . .