@akanjs/cli 3.1.0-rc.1 → 3.1.0-rc.10

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 (98) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-kyprmy06.js → CodeAgent-rkjyxgec.js} +2 -2
  3. package/{CodeTui-21mtze3j.js → CodeTui-h7pyj6xa.js} +1 -1
  4. package/TunnelShare-661cxz5e.js +14 -0
  5. package/{agent.command-f3gsc1gd.js → agent.command-3qxf4xcj.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-5s780vnz.js → application.command-m1kcd7jf.js} +54 -42
  8. package/{applicationBuildRunner-1yaqsrdq.js → applicationBuildRunner-dj0xkrep.js} +26 -33
  9. package/buildBatch.proc.js +24 -15
  10. package/{cloud.command-yj6xb2a7.js → cloud.command-9cp1t0f5.js} +60 -67
  11. package/cloud.script-dgstqt1m.js +24 -0
  12. package/{code.command-3wkn4ja5.js → code.command-0ad6gw2a.js} +6 -6
  13. package/{context.command-9jjn3gcw.js → context.command-0qx447mb.js} +17 -13
  14. package/context.runner-1vsjztjg.js +25 -0
  15. package/{dependencyScanner-06z2dmrr.js → dependencyScanner-3afj2vt1.js} +1 -1
  16. package/{guideline.command-dtczrqpf.js → guideline.command-cv5bmrx2.js} +2 -2
  17. package/guidelines/agentRule/agentRule.instruction.md +3 -3
  18. package/guidelines/conventions/conventions.instruction.md +457 -1071
  19. package/guidelines/cssRule/cssRule.instruction.md +28 -7
  20. package/guidelines/fieldRule/fieldRule.instruction.md +62 -0
  21. package/guidelines/framework/framework.instruction.md +4 -7
  22. package/guidelines/mcpRule/mcpRule.instruction.md +43 -20
  23. package/guidelines/modelConstant/modelConstant.instruction.md +2 -1
  24. package/guidelines/modelStore/modelStore.instruction.md +9 -0
  25. package/guidelines/pageRule/pageRule.instruction.md +80 -0
  26. package/guidelines/queryRule/queryRule.instruction.md +44 -11
  27. package/guidelines/runtimeRule/runtimeRule.instruction.md +113 -17
  28. package/guidelines/ssrRule/ssrRule.instruction.md +13 -0
  29. package/guidelines/transportRule/transportRule.instruction.md +135 -13
  30. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +4 -4
  31. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +68 -7
  32. package/incrementalBuilder.proc.js +10 -7
  33. package/index-192ha4xh.js +1173 -0
  34. package/{index-c76k723e.js → index-1p98exm2.js} +2 -2
  35. package/{index-rwq3ekqc.js → index-1xj2t7cb.js} +7 -7
  36. package/{index-rtct7d43.js → index-20bxxyvn.js} +80 -80
  37. package/{index-qt22xstj.js → index-35hc95h5.js} +5 -3
  38. package/{index-8r4d7cmt.js → index-4mhy6qme.js} +4 -4
  39. package/{index-ww9bhp67.js → index-4pf8g7ff.js} +1 -1
  40. package/{index-2mx692qq.js → index-5edzv8fn.js} +5 -5
  41. package/{index-k9rrten6.js → index-5nd1wtkv.js} +92 -94
  42. package/index-62md4dwy.js +260 -0
  43. package/index-665zp9rs.js +271 -0
  44. package/{index-2etcv0sc.js → index-86jt2a0e.js} +1 -1
  45. package/{index-krq7btbt.js → index-8fp3b47h.js} +419 -418
  46. package/{index-c2yrsxdh.js → index-9z426msb.js} +109 -328
  47. package/{index-ctanya41.js → index-awbdfcf2.js} +4 -4
  48. package/{index-3hx1z96c.js → index-bqbf654f.js} +1 -1
  49. package/{index-rc5rwyps.js → index-bspm21y1.js} +71 -60
  50. package/index-cpb3nvma.js +667 -0
  51. package/{index-jx4bzvwg.js → index-d47ypebv.js} +97 -55
  52. package/{index-ae5pwhgs.js → index-d72hfmdm.js} +15 -13
  53. package/{index-e0cvze1s.js → index-fmzcs8v6.js} +4 -4
  54. package/{index-8ggztp8k.js → index-fyq1z6kt.js} +68 -201
  55. package/{index-1w2qaee2.js → index-g1mbppa9.js} +331 -259
  56. package/{index-gnyf1fqy.js → index-j237xtew.js} +6 -6
  57. package/{index-fm46xrf1.js → index-j4mkhz93.js} +3 -3
  58. package/{index-6jjtnhkw.js → index-jw1zm273.js} +74 -34
  59. package/{index-q958tqqg.js → index-m9jj544v.js} +1 -1
  60. package/index-mdjc93e1.js +33 -0
  61. package/{index-c1x0be5j.js → index-pydbnfez.js} +2 -2
  62. package/{index-56d2g8ms.js → index-qwa5k1j8.js} +1 -1
  63. package/{index-v29746vb.js → index-tamvyvj3.js} +3 -3
  64. package/{index-05g3jayg.js → index-trpasv9q.js} +260 -259
  65. package/{index-2ahj896a.js → index-tvehn2sp.js} +1 -1
  66. package/{index-55mynnqs.js → index-va06nr10.js} +1434 -1173
  67. package/index-vk0pa0mn.js +240 -0
  68. package/{index-aprt7pkz.js → index-w44cy4vs.js} +2271 -3369
  69. package/index.js +22 -22
  70. package/{library.command-gaga5bmq.js → library.command-erp2f56n.js} +3 -3
  71. package/{localRegistry.command-vsreyy42.js → localRegistry.command-y176p558.js} +15 -11
  72. package/{module.command-7vpf6db4.js → module.command-gs2r615e.js} +5 -5
  73. package/{package.command-twmvvf69.js → package.command-j10r76ax.js} +4 -4
  74. package/package.json +21 -21
  75. package/{page.command-5asq7fdf.js → page.command-4h4a8pnh.js} +3 -3
  76. package/{pipeline.command-d0v38572.js → pipeline.command-a2nrk26m.js} +221 -220
  77. package/{primitive.command-dyrs2fm8.js → primitive.command-w6t0asqz.js} +6 -6
  78. package/{projectTypecheck-cvtkrzp2.js → projectTypecheck-f534enqj.js} +1 -1
  79. package/{quality.command-6emsqpbg.js → quality.command-77x7vbbx.js} +4 -4
  80. package/{repair.command-8t6aegv5.js → repair.command-y6sstev7.js} +5 -5
  81. package/{scalar.command-bnggy1x7.js → scalar.command-20b8cy0k.js} +4 -4
  82. package/{subspace.command-md2teygq.js → subspace.command-5c7yasd7.js} +424 -364
  83. package/templates/appSample/lib/task/Task.Util.tsx +7 -7
  84. package/templates/appSample/lib/task/Task.Zone.tsx +1 -1
  85. package/templates/appSample/ui/QuantityControl.tsx +2 -2
  86. package/templates/crudSinglePage/page.tsx +1 -1
  87. package/templates/lib/cnst.ts +0 -1
  88. package/templates/workspaceRoot/.gitignore.template +23 -52
  89. package/templates/workspaceRoot/biome.json.template +1 -1
  90. package/{tunnel.command-jx3tdm2d.js → tunnel.command-2kw8vt9g.js} +8 -4
  91. package/{workflow.command-jx0wag5r.js → workflow.command-2djwmpqf.js} +10 -10
  92. package/{workspace.command-yxd7rr7g.js → workspace.command-6qfgq4b4.js} +38 -34
  93. package/TunnelShare-q4jq08qg.js +0 -9
  94. package/cloud.script-h6pvcpa2.js +0 -20
  95. package/context.runner-atcrzz5b.js +0 -21
  96. package/index-6w0rbr9d.js +0 -68
  97. package/index-n68jx79w.js +0 -120
  98. package/index-pgj2rt78.js +0 -404
@@ -20,7 +20,7 @@ interface StartProps {
20
20
  }
21
21
 
22
22
  export const Start = ({ taskId }: StartProps) => (
23
- <button className={jellyButtonRecipe({ variant: "primary", size: "xs" })} onClick={() => st.do.startTask(taskId)}>
23
+ <button type="button" className={jellyButtonRecipe({ variant: "primary", size: "xs" })} onClick={() => st.do.startTask(taskId)}>
24
24
  {usePage().l("task.taskStart")}
25
25
  </button>
26
26
  );
@@ -30,7 +30,7 @@ interface CompleteProps {
30
30
  }
31
31
 
32
32
  export const Complete = ({ taskId }: CompleteProps) => (
33
- <button className={jellyButtonRecipe({ variant: "success", size: "xs" })} onClick={() => st.do.completeTask(taskId)}>
33
+ <button type="button" className={jellyButtonRecipe({ variant: "success", size: "xs" })} onClick={() => st.do.completeTask(taskId)}>
34
34
  {usePage().l("task.taskComplete")}
35
35
  </button>
36
36
  );
@@ -41,7 +41,7 @@ interface RemoveProps {
41
41
 
42
42
  export const Remove = ({ taskId }: RemoveProps) => (
43
43
  <Model.Remove modelId={taskId} slice={fetch.slice.task}>
44
- <button className={jellyButtonRecipe({ variant: "ghost", size: "xs" }, "text-destructive")}>
44
+ <button type="button" className={jellyButtonRecipe({ variant: "ghost", size: "xs" }, "text-destructive")}>
45
45
  {usePage().l("task.taskRemove")}
46
46
  </button>
47
47
  </Model.Remove>
@@ -63,16 +63,16 @@ export const Toolbox = ({ taskId, status }: ToolboxProps) => {
63
63
  <>
64
64
  {status === "todo" && (
65
65
  <li>
66
- <button onClick={() => st.do.startTask(taskId)}>{l("task.taskStart")}</button>
66
+ <button type="button" onClick={() => st.do.startTask(taskId)}>{l("task.taskStart")}</button>
67
67
  </li>
68
68
  )}
69
69
  {status === "inProgress" && (
70
70
  <li>
71
- <button onClick={() => st.do.completeTask(taskId)}>{l("task.taskComplete")}</button>
71
+ <button type="button" onClick={() => st.do.completeTask(taskId)}>{l("task.taskComplete")}</button>
72
72
  </li>
73
73
  )}
74
74
  <li>
75
- <button className="text-destructive" onClick={() => st.do.removeTask(taskId)}>
75
+ <button type="button" className="text-destructive" onClick={() => st.do.removeTask(taskId)}>
76
76
  {l("task.taskRemove")}
77
77
  </button>
78
78
  </li>
@@ -93,7 +93,7 @@ export const Toolbox = ({ taskId, status }: ToolboxProps) => {
93
93
  // New Task Button: Model.NewWrapper — triggers new Task creation form
94
94
  // export const NewTask = () => (
95
95
  // <Model.NewWrapper partial={{}}>
96
- // <button className={jellyButtonRecipe({ variant: "primary", size: "sm" })}>+ New Task</button>
96
+ // <button type="button" className={jellyButtonRecipe({ variant: "primary", size: "sm" })}>+ New Task</button>
97
97
  // </Model.NewWrapper>
98
98
  // );
99
99
  `,
@@ -31,7 +31,7 @@ export const Card = ({ className, init }: CardProps) => {
31
31
  <div className="flex flex-col items-center gap-4 py-16 text-center">
32
32
  <div className="text-foreground/40 text-lg">{l("task.taskNoTasks")}</div>
33
33
  <Link href="/task/new">
34
- <button className={jellyButtonRecipe({ variant: "primary", size: "sm" })}>
34
+ <button type="button" className={jellyButtonRecipe({ variant: "primary", size: "sm" })}>
35
35
  {l("task.taskCreateFirst")}
36
36
  </button>
37
37
  </Link>
@@ -30,7 +30,7 @@ export const QuantityControl = ({
30
30
  }: QuantityControlProps) => {
31
31
  return (
32
32
  <div className={cn("inline-flex items-center gap-1", className)}>
33
- <button
33
+ <button type="button"
34
34
  className={jellyButtonRecipe({ variant: "default", size: "icon" }, "size-7")}
35
35
  disabled={value <= min}
36
36
  onClick={() => onChange(Math.max(min, value - 1))}
@@ -38,7 +38,7 @@ export const QuantityControl = ({
38
38
  −
39
39
  </button>
40
40
  <span className="w-8 text-center font-medium tabular-nums">{value}</span>
41
- <button
41
+ <button type="button"
42
42
  className={jellyButtonRecipe({ variant: "default", size: "icon" }, "size-7")}
43
43
  disabled={value >= max}
44
44
  onClick={() => onChange(Math.min(max, value + 1))}
@@ -24,7 +24,7 @@ export default page()
24
24
  <div className="flex animate-fadeIn items-center gap-4 px-4 pt-4">
25
25
  <div className="font-bold text-lg md:text-4xl">{l("${dict.model}.modelName")}</div>
26
26
  <Model.New
27
- trigger={<button className={buttonRecipe({ size: "sm", variant: "ghost" })}>{l("base.new")}</button>}
27
+ trigger={<button type="button" className={buttonRecipe({ size: "sm", variant: "ghost" })}>{l("base.new")}</button>}
28
28
  slice={fetch.slice.${dict.model}InPublic}
29
29
  renderTitle="id"
30
30
  >
@@ -7,7 +7,6 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
7
7
  const databaseModules = scanInfo.getDatabaseModules();
8
8
  const scalarModules = scanInfo.getScalarModules();
9
9
  const libs = scanInfo.getLibs();
10
- const libInfos = scanInfo.getLibInfos();
11
10
  return `
12
11
  import { ConstantRegistry } from "akanjs/constant";
13
12
  ${scalarModules.map((module) => `import * as ${module}Cnst from "./__scalar/${module}/${module}.constant";`).join("\n")}
@@ -1,27 +1,18 @@
1
1
  **/dist
2
- /node_modules
3
- /.akan
2
+ **/node_modules
3
+ **/.akan
4
4
  .vscode/*
5
5
  .DS_Store
6
6
  Thumbs.db
7
7
  *.env
8
- **/node_modules
9
8
  /data
10
9
  apps/*/data
11
10
  /releases
12
11
  apps/*/scripts
13
- **/.env
14
- **/env.client.local.ts
15
- **/env.client.debug.ts
16
- **/env.client.develop.ts
17
- **/env.client.main.ts
18
- **/env.client.testing.ts
19
- **/env.server.local.ts
20
- **/env.server.debug.ts
21
- **/env.server.develop.ts
22
- **/env.server.main.ts
23
- **/env.server.testing.ts
24
- **/env.server.type.ts
12
+ **/env.client.*.ts
13
+ !**/env.client.type.ts
14
+ **/env.server.*.ts
15
+ !**/env.server.example.ts
25
16
  **/*secrets.yaml
26
17
  **/kubeconfig.yaml
27
18
  **/secrets.*
@@ -46,7 +37,6 @@ DerivedData
46
37
  *.ipa
47
38
  *.xcuserstate
48
39
 
49
- build/
50
40
  .gradle
51
41
  local.properties
52
42
  *.iml
@@ -56,19 +46,18 @@ local.properties
56
46
  !debug.keystore
57
47
 
58
48
  **/public/precache.*.*.js
59
- **/public/sw.js
60
- **/public/workbox-*.js
61
- **/public/worker-*.js
62
- **/public/fallback-*.js
63
49
  **/public/precache.*.*.js.map
64
- **/public/sw.js.map
50
+ **/public/*sw.js
51
+ **/public/*sw.js.map
52
+ **/public/workbox-*.js
65
53
  **/public/workbox-*.js.map
54
+ **/public/worker-*.js
66
55
  **/public/worker-*.js.map
67
56
  **/public/fallback-*.js
57
+ **/public/fallback-*.js.map
68
58
  **/public/libs
69
59
  **/private/libs
70
60
  **/page/**/(libs)
71
- **/public/firebase-messaging-sw.js
72
61
 
73
62
  **/android/keystore.properties
74
63
  **/vendor/bundle/
@@ -78,24 +67,18 @@ local.properties
78
67
  **/*-secret.yaml
79
68
 
80
69
  # Akanjs files
81
- **/akan.app.json
82
- **/akan.lib.json
83
- **/akan.pkg.json
84
- **/next.config.ts
85
- **/next-env.d.ts
86
- apps/**/lib/__lib/**
87
- libs/**/lib/__lib/**
88
- apps/*/lib/cnst.ts
89
- apps/*/lib/dict.ts
90
- apps/*/lib/db.ts
91
- apps/*/lib/srv.ts
92
- apps/*/lib/st.ts
93
- apps/*/lib/sig.ts
94
- apps/*/lib/useClient.ts
95
- apps/*/lib/useServer.ts
96
- apps/*/lib/*/index.tsx
97
- apps/*/lib/*/index.ts
98
- apps/*/lib/__scalar/*/index.ts
70
+ **/akan.*.json
71
+ */*/lib/__lib/**
72
+ */*/lib/cnst.ts
73
+ */*/lib/dict.ts
74
+ */*/lib/db.ts
75
+ */*/lib/srv.ts
76
+ */*/lib/st.ts
77
+ */*/lib/sig.ts
78
+ */*/lib/useClient.ts
79
+ */*/lib/useServer.ts
80
+ */*/lib/*/index.ts*
81
+ */*/lib/__scalar/*/index.ts
99
82
  apps/*/ui/index.ts
100
83
  apps/*/webkit/index.ts
101
84
  apps/*/srvkit/index.ts
@@ -103,17 +86,6 @@ apps/*/common/index.ts
103
86
  apps/*/plugin/index.ts
104
87
  apps/*/client.ts
105
88
  apps/*/server.ts
106
- libs/*/lib/cnst.ts
107
- libs/*/lib/dict.ts
108
- libs/*/lib/db.ts
109
- libs/*/lib/srv.ts
110
- libs/*/lib/st.ts
111
- libs/*/lib/sig.ts
112
- libs/*/lib/useClient.ts
113
- libs/*/lib/useServer.ts
114
- libs/*/lib/*/index.tsx
115
- libs/*/lib/*/index.ts
116
- libs/*/lib/__scalar/*/index.ts
117
89
  libs/*/ui/index.ts
118
90
  libs/*/webkit/index.ts
119
91
  libs/*/srvkit/index.ts
@@ -122,5 +94,4 @@ libs/*/plugin/index.ts
122
94
  libs/*/client.ts
123
95
  libs/*/server.ts
124
96
  libs/*/index.ts
125
- **/.akan
126
97
  **/tsconfig.tsbuildinfo
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.12/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.5.14/schema.json",
3
3
  "extends": ["@akanjs/devkit/biome.base.json"],
4
4
  "files": {
5
5
  "includes": [
@@ -4,21 +4,25 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-6jjtnhkw.js";
7
+ } from "./index-jw1zm273.js";
8
8
  import"./index-52w0fvh8.js";
9
9
  import {
10
10
  AppExecutor
11
- } from "./index-55mynnqs.js";
11
+ } from "./index-va06nr10.js";
12
12
  import {
13
13
  GlobalConfig,
14
14
  CloudApi
15
- } from "./index-pgj2rt78.js";
15
+ } from "./index-cpb3nvma.js";
16
+ import"./index-m9jj544v.js";
17
+ import"./index-g1mbppa9.js";
18
+ import"./index-192ha4xh.js";
16
19
  import {
17
20
  TunnelShare2
18
- } from "./index-56d2g8ms.js";
21
+ } from "./index-qwa5k1j8.js";
19
22
  import {
20
23
  writeClipboard
21
24
  } from "./index-p6pbz9n5.js";
25
+ import"./index-665zp9rs.js";
22
26
 
23
27
  // pkgs/@akanjs/cli/tunnel/tunnel.script.ts
24
28
  import { select } from "@inquirer/prompts";
@@ -3,20 +3,20 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-6jjtnhkw.js";
6
+ } from "./index-jw1zm273.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-55mynnqs.js";
8
+ import"./index-va06nr10.js";
9
9
  import"./index-hj6w4ka1.js";
10
- import"./index-05g3jayg.js";
11
- import"./index-2mx692qq.js";
12
- import"./index-2etcv0sc.js";
13
- import"./index-e0cvze1s.js";
14
- import"./index-ctanya41.js";
15
- import"./index-fm46xrf1.js";
16
- import"./index-c76k723e.js";
10
+ import"./index-trpasv9q.js";
11
+ import"./index-5edzv8fn.js";
12
+ import"./index-86jt2a0e.js";
13
+ import"./index-fmzcs8v6.js";
14
+ import"./index-awbdfcf2.js";
15
+ import"./index-j4mkhz93.js";
16
+ import"./index-1p98exm2.js";
17
17
  import {
18
18
  WorkflowRunner
19
- } from "./index-rwq3ekqc.js";
19
+ } from "./index-1xj2t7cb.js";
20
20
 
21
21
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
22
22
  import { Logger } from "akanjs/common";
@@ -5,7 +5,7 @@ import {
5
5
  runner,
6
6
  script,
7
7
  command
8
- } from "./index-6jjtnhkw.js";
8
+ } from "./index-jw1zm273.js";
9
9
  import {
10
10
  FileSys2
11
11
  } from "./index-52w0fvh8.js";
@@ -19,64 +19,68 @@ import {
19
19
  AppExecutor,
20
20
  LibExecutor,
21
21
  PkgExecutor
22
- } from "./index-55mynnqs.js";
22
+ } from "./index-va06nr10.js";
23
23
  import {
24
24
  countBlocking,
25
25
  formatStyleContract,
26
26
  ThemeValidator
27
- } from "./index-n68jx79w.js";
27
+ } from "./index-62md4dwy.js";
28
28
  import {
29
29
  collectRecipeSources2,
30
30
  scanRecipes2
31
31
  } from "./index-hj6w4ka1.js";
32
- import"./index-05g3jayg.js";
33
- import"./index-2mx692qq.js";
32
+ import"./index-trpasv9q.js";
33
+ import"./index-5edzv8fn.js";
34
34
  import"./index-zzvvc845.js";
35
35
  import {
36
36
  AgentScript
37
- } from "./index-v29746vb.js";
38
- import"./index-k9rrten6.js";
39
- import"./index-1w2qaee2.js";
37
+ } from "./index-tamvyvj3.js";
38
+ import"./index-5nd1wtkv.js";
39
+ import"./index-vk0pa0mn.js";
40
+ import"./index-m9jj544v.js";
41
+ import"./index-g1mbppa9.js";
42
+ import"./index-192ha4xh.js";
40
43
  import {
41
44
  LibraryScript
42
- } from "./index-c1x0be5j.js";
45
+ } from "./index-pydbnfez.js";
43
46
  import {
44
47
  ApplicationScript
45
- } from "./index-jx4bzvwg.js";
48
+ } from "./index-d47ypebv.js";
46
49
  import"./index-7md2g9vw.js";
47
- import"./index-pgj2rt78.js";
48
- import"./index-2ahj896a.js";
50
+ import"./index-cpb3nvma.js";
51
+ import"./index-tvehn2sp.js";
49
52
  import {
50
53
  PackageScript
51
- } from "./index-gnyf1fqy.js";
54
+ } from "./index-j237xtew.js";
52
55
  import {
53
56
  getNpmRegistryUrl,
54
57
  getLatestPackageVersion
55
- } from "./index-8ggztp8k.js";
58
+ } from "./index-fyq1z6kt.js";
56
59
  import {
57
60
  CloudScript2
58
- } from "./index-rc5rwyps.js";
59
- import"./index-ae5pwhgs.js";
60
- import"./index-fm46xrf1.js";
61
- import"./index-2etcv0sc.js";
62
- import"./index-e0cvze1s.js";
63
- import"./index-ctanya41.js";
64
- import"./index-c76k723e.js";
65
- import"./index-rwq3ekqc.js";
61
+ } from "./index-bspm21y1.js";
62
+ import"./index-d72hfmdm.js";
63
+ import"./index-j4mkhz93.js";
64
+ import"./index-86jt2a0e.js";
65
+ import"./index-fmzcs8v6.js";
66
+ import"./index-awbdfcf2.js";
67
+ import"./index-1p98exm2.js";
68
+ import"./index-1xj2t7cb.js";
66
69
  import {
67
70
  ContextScript
68
- } from "./index-8r4d7cmt.js";
69
- import"./index-qt22xstj.js";
71
+ } from "./index-4mhy6qme.js";
72
+ import"./index-35hc95h5.js";
73
+ import"./index-665zp9rs.js";
70
74
 
71
75
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
72
- import { generateKeyPairSync } from "crypto";
73
76
  import { mkdir, writeFile } from "fs/promises";
74
77
  import path from "path";
75
78
 
76
79
  // pkgs/@akanjs/devkit/biomeBase.ts
77
- var biomeVersion = "2.5.12";
80
+ var biomeVersion = "2.5.14";
78
81
 
79
82
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
83
+ import { Ed25519Key } from "akanjs/server/ed25519Key";
80
84
  var defaultWorkspacePeerDependencies = new Set([
81
85
  "@react-spring/web",
82
86
  "@use-gesture/react",
@@ -97,19 +101,16 @@ var defaultMaxDiagnostics = 200;
97
101
  class WorkspaceRunner extends runner("workspace") {
98
102
  async machineKeygen(workspace, out) {
99
103
  const file = path.resolve(workspace.workspaceRoot, out);
100
- const { privateKey, publicKey } = generateKeyPairSync("ed25519");
104
+ const { privatePem, publicKey } = Ed25519Key.generate();
101
105
  await mkdir(path.dirname(file), { recursive: true });
102
106
  try {
103
- await writeFile(file, privateKey.export({ format: "pem", type: "pkcs8" }).toString(), {
104
- mode: 384,
105
- flag: "wx"
106
- });
107
+ await writeFile(file, privatePem, { mode: 384, flag: "wx" });
107
108
  } catch (error) {
108
109
  if (error.code === "EEXIST")
109
110
  throw new Error(`${file} exists; machine-keygen never overwrites a key. Name another file.`);
110
111
  throw error;
111
112
  }
112
- return { file, publicKey: publicKey.export({ format: "jwk" }).x ?? "" };
113
+ return { file, publicKey };
113
114
  }
114
115
  async generateAgentRules(workspace, { overwrite = false, cursorRules = true } = {}) {
115
116
  const [appNames] = await workspace.getExecs();
@@ -383,7 +384,8 @@ class WorkspaceScript extends script("workspace", [
383
384
  }
384
385
  async machineKeygen(workspace, out) {
385
386
  const { file, publicKey } = await this.workspaceRunner.machineKeygen(workspace, out);
386
- Logger.rawLog(`Wrote the private key to ${file} (mode 600). Set it as AKAN_MACHINE_PRIVATE_KEY on the server that issues machine tokens; nothing else needs it.`);
387
+ const access = process.platform === "win32" ? "; Windows gives it the permissions of its folder, so keep it in one only you can read" : " (mode 600)";
388
+ Logger.rawLog(`Wrote the private key to ${file}${access}. Set it as AKAN_MACHINE_PRIVATE_KEY on the server that issues machine tokens; nothing else needs it.`);
387
389
  Logger.rawLog(`A server that only verifies them takes the public key:
388
390
  AKAN_MACHINE_PUBLIC_KEY=${publicKey}`);
389
391
  }
@@ -495,7 +497,9 @@ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public
495
497
  }),
496
498
  machineKeygen: target({
497
499
  desc: "Make an Ed25519 key for machine tokens: write the private key to a file, print the public key"
498
- }).arg("out", String, { desc: "file the private key is written to (mode 600); an existing one is refused" }).with(Workspace).exec(async function(out, workspace) {
500
+ }).arg("out", String, {
501
+ desc: "file the private key is written to (mode 600; on Windows, its folder's permissions); an existing one is refused"
502
+ }).with(Workspace).exec(async function(out, workspace) {
499
503
  await this.workspaceScript.machineKeygen(workspace, out);
500
504
  }),
501
505
  syncAll: target({ desc: "Sync dependencies and configuration for all apps and libraries" }).with(Workspace).exec(async function(workspace) {
@@ -1,9 +0,0 @@
1
- // @bun
2
- import {
3
- TunnelShare2
4
- } from "./index-56d2g8ms.js";
5
- import"./index-pgj2rt78.js";
6
- import"./index-52w0fvh8.js";
7
- export {
8
- TunnelShare2 as TunnelShare
9
- };
@@ -1,20 +0,0 @@
1
- // @bun
2
- import {
3
- CloudScript2
4
- } from "./index-rc5rwyps.js";
5
- import"./index-8ggztp8k.js";
6
- import"./index-jx4bzvwg.js";
7
- import"./index-qt22xstj.js";
8
- import"./index-c1x0be5j.js";
9
- import"./index-gnyf1fqy.js";
10
- import"./index-1w2qaee2.js";
11
- import"./index-pgj2rt78.js";
12
- import"./index-6jjtnhkw.js";
13
- import"./index-7md2g9vw.js";
14
- import"./index-k9rrten6.js";
15
- import"./index-55mynnqs.js";
16
- import"./index-2ahj896a.js";
17
- import"./index-52w0fvh8.js";
18
- export {
19
- CloudScript2 as CloudScript
20
- };
@@ -1,21 +0,0 @@
1
- // @bun
2
- import {
3
- ContextRunner2
4
- } from "./index-ae5pwhgs.js";
5
- import"./index-rwq3ekqc.js";
6
- import"./index-c76k723e.js";
7
- import"./index-ctanya41.js";
8
- import"./index-fm46xrf1.js";
9
- import"./index-e0cvze1s.js";
10
- import"./index-2etcv0sc.js";
11
- import"./index-1w2qaee2.js";
12
- import"./index-2mx692qq.js";
13
- import"./index-05g3jayg.js";
14
- import"./index-zzvvc845.js";
15
- import"./index-6jjtnhkw.js";
16
- import"./index-55mynnqs.js";
17
- import"./index-hj6w4ka1.js";
18
- import"./index-52w0fvh8.js";
19
- export {
20
- ContextRunner2 as ContextRunner
21
- };
package/index-6w0rbr9d.js DELETED
@@ -1,68 +0,0 @@
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 };