@akanjs/cli 3.1.1-rc.15 → 3.1.1-rc.16

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 (71) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-gtwn7tmb.js → CodeAgent-23ewzxqa.js} +2 -2
  3. package/{CodeTui-v941fqdh.js → CodeTui-kc99fk78.js} +1 -1
  4. package/TunnelShare-dk2gw78d.js +14 -0
  5. package/{agent.command-h82gepwn.js → agent.command-knp5j7bq.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-j1reb9p1.js → application.command-bvfd1680.js} +9 -9
  8. package/{applicationBuildRunner-w20x63mz.js → applicationBuildRunner-4ajaesk1.js} +6 -5
  9. package/buildBatch.proc.js +5 -5
  10. package/{cloud.command-zd2mfkm0.js → cloud.command-f2w40fyy.js} +13 -13
  11. package/cloud.script-2r82sv0f.js +24 -0
  12. package/{code.command-dyet4xn6.js → code.command-dbhhnahn.js} +6 -6
  13. package/{context.command-79gxczm4.js → context.command-yswjwv6y.js} +17 -16
  14. package/context.runner-c3wsh2jw.js +26 -0
  15. package/{guideline.command-xwkskvky.js → guideline.command-ztx6dkpk.js} +2 -2
  16. package/guidelines/conventions/conventions.instruction.md +56 -10
  17. package/incrementalBuilder.proc.js +3 -3
  18. package/{index-yknrmkmt.js → index-005dqc83.js} +2 -2
  19. package/{index-qmeh0s05.js → index-00ke4phc.js} +2 -2
  20. package/{index-hdzjaq7s.js → index-2epb3wgh.js} +2 -2
  21. package/{index-rshwdv9w.js → index-2p1brf5e.js} +2 -2
  22. package/{index-wvvwdzfw.js → index-4332q6yj.js} +3 -3
  23. package/{index-6pzt55w3.js → index-4t4qb8jg.js} +3 -3
  24. package/{index-7ktk2hnz.js → index-76jwsm3g.js} +2 -2
  25. package/{index-tzzs52h0.js → index-7ndgffg4.js} +9 -9
  26. package/{index-1e2955yd.js → index-921cxqrd.js} +3 -1
  27. package/{index-8jb5ep2e.js → index-97fsvy66.js} +2 -2
  28. package/{index-pc9ps0hx.js → index-9sa6abze.js} +8 -8
  29. package/{index-jjd97ya6.js → index-deeskxjh.js} +1 -1
  30. package/{index-cz9g85xh.js → index-er16p89s.js} +1 -1
  31. package/{index-ygy8c12j.js → index-gxj80jz7.js} +1 -1
  32. package/index-hvg3esm0.js +1844 -0
  33. package/{index-41d3zx66.js → index-k9k18vq9.js} +3 -3
  34. package/{index-nmy1rana.js → index-m54n0v29.js} +4 -4
  35. package/index-m5n3ka0p.js +18 -0
  36. package/{index-brpk7gd8.js → index-m6qgr1rx.js} +7 -7
  37. package/{index-553xyb55.js → index-m93qg20j.js} +1 -1
  38. package/{index-4rwfh2de.js → index-mk391h0z.js} +3 -3
  39. package/{index-ch1sv7ke.js → index-nzfgyw3b.js} +9 -21
  40. package/{index-2qzzp0c9.js → index-p2pahmsa.js} +3 -3
  41. package/{index-kbbyzs6j.js → index-qx4r4cj2.js} +2 -2
  42. package/index-rxse80x6.js +408 -0
  43. package/{index-kr62ph5a.js → index-s4c2y5gs.js} +2 -2
  44. package/{index-jtydvvq7.js → index-saj9cx3a.js} +4 -4
  45. package/index-vgt25eh1.js +615 -0
  46. package/{index-8rvwgd1r.js → index-vq77g679.js} +1 -1
  47. package/{index-xeh7m2j5.js → index-xfp4dcnx.js} +1 -1
  48. package/{index-pqdz7rat.js → index-xjwcp91m.js} +910 -36
  49. package/{index-7abjzny1.js → index-ysyt782g.js} +33 -37
  50. package/index.js +22 -22
  51. package/{library.command-td8t85kb.js → library.command-hmbkcwzw.js} +3 -3
  52. package/{localRegistry.command-jx9zkmxf.js → localRegistry.command-sq5p4c9x.js} +15 -13
  53. package/{module.command-j70mqgpp.js → module.command-n4z29zcv.js} +5 -5
  54. package/{package.command-1b1v6k5v.js → package.command-20025dy3.js} +3 -3
  55. package/package.json +2 -2
  56. package/{page.command-m31w2tsz.js → page.command-q8fvpjer.js} +3 -3
  57. package/{pipeline.command-q7b8wy55.js → pipeline.command-8j97fq88.js} +2 -2
  58. package/{primitive.command-4zrbhkb9.js → primitive.command-e5y6dqp1.js} +6 -6
  59. package/{projectTypecheck-synx6qff.js → projectTypecheck-tbdye9k3.js} +1 -1
  60. package/{quality.command-cy0pgqjz.js → quality.command-168pt5vm.js} +621 -311
  61. package/{repair.command-98n6zxg7.js → repair.command-dq1gckth.js} +5 -5
  62. package/{scalar.command-rak5pjk3.js → scalar.command-5vwf152w.js} +4 -4
  63. package/{subspace.command-ej0rk116.js → subspace.command-182be8vj.js} +8 -8
  64. package/{tunnel.command-kdx3amrc.js → tunnel.command-bfzj7xkb.js} +7 -7
  65. package/{workflow.command-gffk9nj9.js → workflow.command-3g53242s.js} +37 -13
  66. package/workspace.command-h7399jwv.js +260 -0
  67. package/TunnelShare-26ty9skr.js +0 -14
  68. package/cloud.script-vdj8ymch.js +0 -24
  69. package/context.runner-ejag7mhr.js +0 -25
  70. package/index-y5m4j2w6.js +0 -856
  71. package/workspace.command-097hv6n1.js +0 -521
@@ -1,13 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-qmeh0s05.js";
4
+ } from "./index-00ke4phc.js";
5
5
  import {
6
6
  AppExecutor,
7
7
  LibExecutor,
8
8
  ModuleExecutor
9
- } from "./index-1e2955yd.js";
9
+ } from "./index-921cxqrd.js";
10
10
  import {
11
+ InteractionScaffold,
11
12
  workflowStatus,
12
13
  compactDiagnostics,
13
14
  sourceFile,
@@ -40,11 +41,12 @@ import {
40
41
  insertClassMethod,
41
42
  hasSignalFactoryEntry,
42
43
  insertSignalFactoryEntry,
43
- addFieldUiPolicyForType
44
- } from "./index-pqdz7rat.js";
44
+ addFieldUiPolicyForType,
45
+ MutationScaffold
46
+ } from "./index-xjwcp91m.js";
45
47
  import {
46
48
  ModuleScript
47
- } from "./index-nmy1rana.js";
49
+ } from "./index-m54n0v29.js";
48
50
 
49
51
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
50
52
  import { capitalize, lowerlize } from "akanjs/common";
@@ -269,38 +271,22 @@ class PrimitiveScript extends script("primitive", [ModuleScript]) {
269
271
  return PrimitiveScript.#report(command, sys, changedFiles, diagnostics);
270
272
  }
271
273
  async addMutation(workspace, input) {
272
- const moduleClassName = input.module ? moduleComponentName(input.module) : "";
273
- const serviceRef = lowerlize(moduleClassName);
274
- const name = input.mutation;
275
- return await this.#writeServiceSignalEntry(workspace, {
276
- command: "add-mutation",
277
- app: input.app,
278
- module: input.module,
279
- entryKind: "mutation",
280
- entryName: name,
281
- requiredInput: "mutation",
282
- serviceMethod: name ? {
283
- name,
284
- block: [
285
- ` async ${name}() {`,
286
- ` // TODO(service): implement ${moduleClassName}Service.${name}`,
287
- ` return true;`,
288
- ` }`
289
- ].join(`
290
- `)
291
- } : null,
292
- signal: name ? {
293
- className: `${moduleClassName}Endpoint`,
294
- entryLine: [
295
- `${name}: mutation(Boolean, { guards: [None] })`,
296
- ` .exec(async function () {`,
297
- ` return await this.${serviceRef}Service.${name}();`,
298
- ` }),`
299
- ].join(`
300
- `),
301
- param: { mode: "destructure", name: "mutation" }
302
- } : null
303
- });
274
+ const sys = await this.resolveSys(workspace, input.app);
275
+ if (!sys || !input.module || !input.mutation)
276
+ return PrimitiveScript.#refuse("add-mutation", compactDiagnostics([
277
+ !sys && PrimitiveScript.#targetMissing(),
278
+ !input.module && PrimitiveScript.#inputMissing("module"),
279
+ !input.mutation && PrimitiveScript.#inputMissing("mutation", "Mutation name is required.")
280
+ ]));
281
+ const { diagnostics, files } = await MutationScaffold.build(sys, input);
282
+ return await PrimitiveScript.#writeScaffold("add-mutation", sys, files, diagnostics);
283
+ }
284
+ async createInteraction(workspace, input) {
285
+ const sys = await this.resolveSys(workspace, input.app);
286
+ if (!sys)
287
+ return PrimitiveScript.#refuse("create-interaction", [PrimitiveScript.#targetMissing()]);
288
+ const { diagnostics, files } = await InteractionScaffold.build(sys, input.interaction);
289
+ return await PrimitiveScript.#writeScaffold("create-interaction", sys, files, diagnostics);
304
290
  }
305
291
  async addSlice(workspace, input) {
306
292
  const moduleClassName = input.module ? moduleComponentName(input.module) : "";
@@ -423,6 +409,16 @@ class PrimitiveScript extends script("primitive", [ModuleScript]) {
423
409
  }
424
410
  return PrimitiveScript.#report(spec.command, sys, changedFiles, diagnostics);
425
411
  }
412
+ static async#writeScaffold(command, sys, files, diagnostics) {
413
+ const changedFiles = [];
414
+ if (workflowStatus(diagnostics) === "passed") {
415
+ for (const file of files) {
416
+ await sys.writeFile(file.path, file.content, { silent: true });
417
+ changedFiles.push(sourceFile(sys, file.path, file.action, file.reason));
418
+ }
419
+ }
420
+ return PrimitiveScript.#report(command, sys, changedFiles, diagnostics);
421
+ }
426
422
  static #refuse(command, diagnostics) {
427
423
  return createPrimitiveWriteReport({
428
424
  command,
package/index.js CHANGED
@@ -4,9 +4,9 @@ import {
4
4
  getTargetMetas,
5
5
  getTargetCommandNames,
6
6
  runCommands
7
- } from "./index-qmeh0s05.js";
7
+ } from "./index-00ke4phc.js";
8
8
  import"./index-52w0fvh8.js";
9
- import"./index-1e2955yd.js";
9
+ import"./index-921cxqrd.js";
10
10
 
11
11
  // pkgs/@akanjs/cli/bunVersionGuard.ts
12
12
  class BunVersionGuard {
@@ -22,26 +22,26 @@ import path from "path";
22
22
 
23
23
  // pkgs/@akanjs/cli/commandModules.ts
24
24
  var commandModules = {
25
- workspace: async () => (await import("./workspace.command-097hv6n1.js")).WorkspaceCommand,
26
- agent: async () => (await import("./agent.command-h82gepwn.js")).AgentCommand,
27
- code: async () => (await import("./code.command-dyet4xn6.js")).CodeCommand,
28
- application: async () => (await import("./application.command-j1reb9p1.js")).ApplicationCommand,
29
- library: async () => (await import("./library.command-td8t85kb.js")).LibraryCommand,
30
- localRegistry: async () => (await import("./localRegistry.command-jx9zkmxf.js")).LocalRegistryCommand,
31
- package: async () => (await import("./package.command-1b1v6k5v.js")).PackageCommand,
32
- module: async () => (await import("./module.command-j70mqgpp.js")).ModuleCommand,
33
- page: async () => (await import("./page.command-m31w2tsz.js")).PageCommand,
34
- context: async () => (await import("./context.command-79gxczm4.js")).ContextCommand,
35
- cloud: async () => (await import("./cloud.command-zd2mfkm0.js")).CloudCommand,
36
- subspace: async () => (await import("./subspace.command-ej0rk116.js")).SubspaceCommand,
37
- guideline: async () => (await import("./guideline.command-xwkskvky.js")).GuidelineCommand,
38
- scalar: async () => (await import("./scalar.command-rak5pjk3.js")).ScalarCommand,
39
- primitive: async () => (await import("./primitive.command-4zrbhkb9.js")).PrimitiveCommand,
40
- quality: async () => (await import("./quality.command-cy0pgqjz.js")).QualityCommand,
41
- repair: async () => (await import("./repair.command-98n6zxg7.js")).RepairCommand,
42
- workflow: async () => (await import("./workflow.command-gffk9nj9.js")).WorkflowCommand,
43
- pipeline: async () => (await import("./pipeline.command-q7b8wy55.js")).PipelineCommand,
44
- tunnel: async () => (await import("./tunnel.command-kdx3amrc.js")).TunnelCommand
25
+ workspace: async () => (await import("./workspace.command-h7399jwv.js")).WorkspaceCommand,
26
+ agent: async () => (await import("./agent.command-knp5j7bq.js")).AgentCommand,
27
+ code: async () => (await import("./code.command-dbhhnahn.js")).CodeCommand,
28
+ application: async () => (await import("./application.command-bvfd1680.js")).ApplicationCommand,
29
+ library: async () => (await import("./library.command-hmbkcwzw.js")).LibraryCommand,
30
+ localRegistry: async () => (await import("./localRegistry.command-sq5p4c9x.js")).LocalRegistryCommand,
31
+ package: async () => (await import("./package.command-20025dy3.js")).PackageCommand,
32
+ module: async () => (await import("./module.command-n4z29zcv.js")).ModuleCommand,
33
+ page: async () => (await import("./page.command-q8fvpjer.js")).PageCommand,
34
+ context: async () => (await import("./context.command-yswjwv6y.js")).ContextCommand,
35
+ cloud: async () => (await import("./cloud.command-f2w40fyy.js")).CloudCommand,
36
+ subspace: async () => (await import("./subspace.command-182be8vj.js")).SubspaceCommand,
37
+ guideline: async () => (await import("./guideline.command-ztx6dkpk.js")).GuidelineCommand,
38
+ scalar: async () => (await import("./scalar.command-5vwf152w.js")).ScalarCommand,
39
+ primitive: async () => (await import("./primitive.command-e5y6dqp1.js")).PrimitiveCommand,
40
+ quality: async () => (await import("./quality.command-168pt5vm.js")).QualityCommand,
41
+ repair: async () => (await import("./repair.command-dq1gckth.js")).RepairCommand,
42
+ workflow: async () => (await import("./workflow.command-3g53242s.js")).WorkflowCommand,
43
+ pipeline: async () => (await import("./pipeline.command-8j97fq88.js")).PipelineCommand,
44
+ tunnel: async () => (await import("./tunnel.command-bfzj7xkb.js")).TunnelCommand
45
45
  };
46
46
  var commandModuleIds = Object.keys(commandModules);
47
47
 
@@ -3,12 +3,12 @@ import {
3
3
  Lib,
4
4
  Workspace,
5
5
  command
6
- } from "./index-qmeh0s05.js";
6
+ } from "./index-00ke4phc.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-1e2955yd.js";
8
+ import"./index-921cxqrd.js";
9
9
  import {
10
10
  LibraryScript
11
- } from "./index-rshwdv9w.js";
11
+ } from "./index-2p1brf5e.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/library/library.command.ts
14
14
  class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
@@ -4,32 +4,34 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-qmeh0s05.js";
7
+ } from "./index-00ke4phc.js";
8
8
  import"./index-52w0fvh8.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-1e2955yd.js";
11
+ } from "./index-921cxqrd.js";
12
12
  import"./index-5nd1wtkv.js";
13
- import"./index-2qzzp0c9.js";
14
- import"./index-8rvwgd1r.js";
13
+ import"./index-p2pahmsa.js";
14
+ import"./index-vq77g679.js";
15
15
  import"./index-m9jj544v.js";
16
- import"./index-yknrmkmt.js";
17
- import"./index-cz9g85xh.js";
18
- import"./index-rshwdv9w.js";
16
+ import"./index-005dqc83.js";
17
+ import"./index-er16p89s.js";
18
+ import"./index-2p1brf5e.js";
19
19
  import {
20
20
  ApplicationScript
21
- } from "./index-tzzs52h0.js";
21
+ } from "./index-7ndgffg4.js";
22
22
  import"./index-7md2g9vw.js";
23
- import"./index-7ktk2hnz.js";
23
+ import"./index-76jwsm3g.js";
24
24
  import {
25
- getNpmRegistryUrl,
26
25
  CloudRunner
27
- } from "./index-ch1sv7ke.js";
26
+ } from "./index-nzfgyw3b.js";
28
27
  import"./index-tvehn2sp.js";
29
28
  import {
30
29
  PackageScript
31
- } from "./index-hdzjaq7s.js";
32
- import"./index-553xyb55.js";
30
+ } from "./index-2epb3wgh.js";
31
+ import {
32
+ getNpmRegistryUrl
33
+ } from "./index-m5n3ka0p.js";
34
+ import"./index-m93qg20j.js";
33
35
 
34
36
  // pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
35
37
  import { mkdir, rm } from "fs/promises";
@@ -3,16 +3,16 @@ import {
3
3
  Sys,
4
4
  Module,
5
5
  command
6
- } from "./index-qmeh0s05.js";
6
+ } from "./index-00ke4phc.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-1e2955yd.js";
8
+ import"./index-921cxqrd.js";
9
9
  import {
10
10
  renderPrimitiveReport
11
- } from "./index-pqdz7rat.js";
12
- import"./index-ygy8c12j.js";
11
+ } from "./index-xjwcp91m.js";
12
+ import"./index-gxj80jz7.js";
13
13
  import {
14
14
  ModuleScript
15
- } from "./index-nmy1rana.js";
15
+ } from "./index-m54n0v29.js";
16
16
 
17
17
  // pkgs/@akanjs/cli/module/module.command.ts
18
18
  import { Logger, lowerlize } from "akanjs/common";
@@ -3,13 +3,13 @@ import {
3
3
  Pkg,
4
4
  Workspace,
5
5
  command
6
- } from "./index-qmeh0s05.js";
6
+ } from "./index-00ke4phc.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-1e2955yd.js";
8
+ import"./index-921cxqrd.js";
9
9
  import"./index-tvehn2sp.js";
10
10
  import {
11
11
  PackageScript
12
- } from "./index-hdzjaq7s.js";
12
+ } from "./index-2epb3wgh.js";
13
13
 
14
14
  // pkgs/@akanjs/cli/package/package.command.ts
15
15
  class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.1.1-rc.15",
3
+ "version": "3.1.1-rc.16",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -39,7 +39,7 @@
39
39
  "@earendil-works/pi-tui": "1.3.0",
40
40
  "@inquirer/prompts": "^8.7.3",
41
41
  "@tailwindcss/node": "^4.3.3",
42
- "akanjs": "3.1.1-rc.15",
42
+ "akanjs": "3.1.1-rc.16",
43
43
  "chalk": "^6.0.1",
44
44
  "commander": "^15.0.0",
45
45
  "dayjs": "^1.11.23",
@@ -3,12 +3,12 @@ import {
3
3
  App,
4
4
  Module,
5
5
  command
6
- } from "./index-qmeh0s05.js";
6
+ } from "./index-00ke4phc.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-1e2955yd.js";
8
+ import"./index-921cxqrd.js";
9
9
  import {
10
10
  PageScript
11
- } from "./index-ygy8c12j.js";
11
+ } from "./index-gxj80jz7.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/page/page.command.ts
14
14
  class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
@@ -4,7 +4,7 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-qmeh0s05.js";
7
+ } from "./index-00ke4phc.js";
8
8
  import {
9
9
  FileSys2
10
10
  } from "./index-52w0fvh8.js";
@@ -12,7 +12,7 @@ import {
12
12
  AkanAppConfig,
13
13
  AkanWorkspaceConfig,
14
14
  AppExecutor
15
- } from "./index-1e2955yd.js";
15
+ } from "./index-921cxqrd.js";
16
16
  import {
17
17
  resolveMobileTargets
18
18
  } from "./index-m9jj544v.js";
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-qmeh0s05.js";
5
+ } from "./index-00ke4phc.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-1e2955yd.js";
7
+ import"./index-921cxqrd.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-pqdz7rat.js";
11
- import"./index-ygy8c12j.js";
12
- import"./index-nmy1rana.js";
10
+ } from "./index-xjwcp91m.js";
11
+ import"./index-gxj80jz7.js";
12
+ import"./index-m54n0v29.js";
13
13
  import {
14
14
  PrimitiveScript
15
- } from "./index-7abjzny1.js";
15
+ } from "./index-ysyt782g.js";
16
16
 
17
17
  // pkgs/@akanjs/cli/primitive/primitive.command.ts
18
18
  import { Logger } from "akanjs/common";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  ProjectTypecheck2
4
- } from "./index-1e2955yd.js";
4
+ } from "./index-921cxqrd.js";
5
5
  export {
6
6
  ProjectTypecheck2 as ProjectTypecheck
7
7
  };