@akanjs/cli 3.0.0-alpha.79 → 3.0.0-alpha.80

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 (76) hide show
  1. package/.build-stamp +1 -1
  2. package/{abstractCompactor-8yjc9sj4.js → abstractCompactor-pwc6d6yk.js} +3 -5
  3. package/{agent.command-q2rgd8jz.js → agent.command-180hh0ye.js} +11 -14
  4. package/{application.command-kd5zj0k9.js → application.command-gmcgen9y.js} +29 -34
  5. package/{applicationBuildRunner-8tqhxjd0.js → applicationBuildRunner-tavpx3fv.js} +9 -12
  6. package/{applicationReleasePackager-0jf6ejr4.js → applicationReleasePackager-ktjt0erc.js} +6 -7
  7. package/buildBatch.proc.js +12 -15
  8. package/capacitorApp-kwa67kzs.js +12 -0
  9. package/{cloud.command-v60xnfdx.js → cloud.command-gpq7qxrc.js} +15 -21
  10. package/{context.command-hac3x83c.js → context.command-dk2m2sjx.js} +19 -24
  11. package/dependencyScanner-c64m6fxp.js +8 -0
  12. package/{fleet.command-jv24wcae.js → fleet.command-3bkyyd3a.js} +67 -24
  13. package/getDirname-dr3jz1xg.js +7 -0
  14. package/{guideline.command-85x1tvjb.js → guideline.command-w6ddv13r.js} +16 -19
  15. package/incrementalBuilder.proc.js +17 -20
  16. package/{index-yz8988we.js → index-1kzsn94d.js} +1 -1
  17. package/{index-dz1q44m8.js → index-3c9n3nt8.js} +21 -21
  18. package/{index-76rn3g2c.js → index-47pj3aee.js} +4 -4
  19. package/{index-dfn0kqj7.js → index-5n0hf8r9.js} +19 -19
  20. package/{index-w0g7hcr7.js → index-5y7qba1c.js} +19 -19
  21. package/{index-1577bej2.js → index-6wwzs1bc.js} +2 -2
  22. package/{index-94hdqqka.js → index-92zztqy1.js} +6 -6
  23. package/{index-ffrhjdwd.js → index-a8h184wr.js} +7 -7
  24. package/{index-67546d0j.js → index-ayy5ecax.js} +1 -1
  25. package/{index-zec5gcx0.js → index-b2nt0w0k.js} +7 -7
  26. package/{index-xys926f2.js → index-by5gpp8x.js} +4 -4
  27. package/{index-47zynjx7.js → index-cd5x18qh.js} +32 -32
  28. package/{index-pzsryyjv.js → index-dq6wq1tv.js} +39 -39
  29. package/{index-psx0z6hb.js → index-ee8z8adx.js} +13 -13
  30. package/{index-zp0cmfgd.js → index-f7wewj2v.js} +22 -25
  31. package/{index-1szrbtj9.js → index-ft1sfjz0.js} +20 -23
  32. package/{index-k7731a4v.js → index-h7yw2z9n.js} +3 -3
  33. package/{index-egng0kc4.js → index-j9vnq8tr.js} +18 -18
  34. package/{index-zkrzv21w.js → index-k1n0h7dk.js} +519 -123
  35. package/{index-pj3hk9kt.js → index-k86zc21w.js} +57 -57
  36. package/{index-h5sr2nnj.js → index-mfm35dhh.js} +5 -5
  37. package/{index-qwfwk8be.js → index-qcracvc9.js} +8 -8
  38. package/{index-6w77v5df.js → index-saheq2bs.js} +4 -4
  39. package/{index-ta1mk0xh.js → index-v0s24t8j.js} +15 -15
  40. package/{index-safgeq9a.js → index-wet2ytnr.js} +8 -8
  41. package/{index-jn9b717k.js → index-xnhf8tr9.js} +1 -1
  42. package/{index-7605ykh6.js → index-xxe90kqy.js} +6 -6
  43. package/{index-25qfm3at.js → index-z3c9mmw4.js} +14 -16
  44. package/index.js +22 -27
  45. package/{library.command-nvp0wetm.js → library.command-wpedct6c.js} +7 -11
  46. package/{localRegistry.command-dnefn893.js → localRegistry.command-pjdxa01g.js} +20 -26
  47. package/{module.command-xs6ded4j.js → module.command-8n4kct3e.js} +13 -17
  48. package/{package.command-af8sxhff.js → package.command-fcbd0b1d.js} +8 -11
  49. package/package.json +2 -2
  50. package/{page.command-gr6rbz17.js → page.command-x4379grq.js} +7 -10
  51. package/{primitive.command-qjf4mbth.js → primitive.command-8etmnqhq.js} +13 -17
  52. package/{quality.command-9xhaxzm1.js → quality.command-hfx7z8yr.js} +11 -14
  53. package/recipeScanner-fpagtgc1.js +11 -0
  54. package/{repair.command-a2z4d5a0.js → repair.command-j0fs5qkz.js} +12 -15
  55. package/{routeSourceValidator-7fycdqyv.js → routeSourceValidator-ze6x894c.js} +0 -2
  56. package/{scalar.command-ax8taqh1.js → scalar.command-2emk89eh.js} +11 -15
  57. package/templates/workspaceRoot/package.json.template +1 -3
  58. package/typeChecker-3xgrzc2v.js +7 -0
  59. package/typecheck.proc.js +4 -5
  60. package/{workflow.command-gwkw0jae.js → workflow.command-cvpmzwjg.js} +22 -26
  61. package/{workspace.command-53qpkgzp.js → workspace.command-mbb5s3wx.js} +57 -64
  62. package/capacitorApp-szqr3cxr.js +0 -62
  63. package/dependencyScanner-aqg3dkks.js +0 -9
  64. package/getDirname-ka11hm7e.js +0 -8
  65. package/index-dp66vwr6.js +0 -348
  66. package/index-mxvakhsm.js +0 -66
  67. package/index-yb2wsc7f.js +0 -4
  68. package/recipeScanner-zrzev25x.js +0 -12
  69. package/typeChecker-yhs4eht8.js +0 -8
  70. /package/{index-19nz5chq.js → index-3d9y066c.js} +0 -0
  71. /package/{index-ynf37b66.js → index-a5vmm6x4.js} +0 -0
  72. /package/{index-5vy2jzar.js → index-ctphds8v.js} +0 -0
  73. /package/{index-0wae5ebk.js → index-meh558jy.js} +0 -0
  74. /package/{index-scemmfpj.js → index-n68jx79w.js} +0 -0
  75. /package/{index-ss469dec.js → index-nz8prx9g.js} +0 -0
  76. /package/{index-jcm6zr20.js → index-x23688ar.js} +0 -0
package/.build-stamp CHANGED
@@ -1 +1 @@
1
- cf6fb8dcfc0612632ce017ac1392fc79539d43ebd61935bdd0d70bb0a115da23
1
+ 63d29c41a185afe732ccce2296754b62d7c91739ea63a59ec9eb83380af7b4aa
@@ -1,13 +1,11 @@
1
1
  // @bun
2
+ import"./index-ayy5ecax.js";
2
3
  import {
3
4
  AiSession
4
- } from "./index-safgeq9a.js";
5
+ } from "./index-wet2ytnr.js";
5
6
  import {
6
7
  AbstractDoc
7
- } from "./index-0wae5ebk.js";
8
- import"./index-mxvakhsm.js";
9
- import"./index-67546d0j.js";
10
- import"./index-yb2wsc7f.js";
8
+ } from "./index-meh558jy.js";
11
9
 
12
10
  // pkgs/@akanjs/devkit/abstractCompactor.ts
13
11
  import { Logger } from "akanjs/common";
@@ -1,21 +1,18 @@
1
1
  // @bun
2
- import {
3
- AgentScript
4
- } from "./index-dfn0kqj7.js";
5
- import"./index-w0g7hcr7.js";
6
- import"./index-k7731a4v.js";
7
- import"./index-6w77v5df.js";
8
2
  import {
9
3
  Workspace,
10
4
  command
11
- } from "./index-1szrbtj9.js";
12
- import"./index-zkrzv21w.js";
13
- import"./index-dp66vwr6.js";
14
- import"./index-mxvakhsm.js";
15
- import"./index-xys926f2.js";
16
- import"./index-1577bej2.js";
17
- import"./index-67546d0j.js";
18
- import"./index-yb2wsc7f.js";
5
+ } from "./index-ft1sfjz0.js";
6
+ import"./index-k1n0h7dk.js";
7
+ import"./index-ayy5ecax.js";
8
+ import"./index-6wwzs1bc.js";
9
+ import"./index-by5gpp8x.js";
10
+ import"./index-saheq2bs.js";
11
+ import"./index-5y7qba1c.js";
12
+ import"./index-h7yw2z9n.js";
13
+ import {
14
+ AgentScript
15
+ } from "./index-5n0hf8r9.js";
19
16
 
20
17
  // pkgs/@akanjs/cli/agent/agent.command.ts
21
18
  class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
@@ -1,31 +1,26 @@
1
1
  // @bun
2
- import {
3
- AbstractDoc
4
- } from "./index-0wae5ebk.js";
5
- import {
6
- ApplicationScript
7
- } from "./index-zp0cmfgd.js";
8
- import"./index-7605ykh6.js";
9
- import"./index-jn9b717k.js";
10
- import"./index-19nz5chq.js";
11
- import {
12
- getMobileTargetChoices
13
- } from "./index-76rn3g2c.js";
14
2
  import {
15
3
  App,
16
- Exec,
17
4
  Sys,
5
+ Exec,
18
6
  Workspace,
19
7
  command
20
- } from "./index-1szrbtj9.js";
21
- import"./index-ynf37b66.js";
22
- import"./index-5vy2jzar.js";
23
- import"./index-zkrzv21w.js";
24
- import"./index-dp66vwr6.js";
25
- import"./index-mxvakhsm.js";
26
- import"./index-1577bej2.js";
27
- import"./index-67546d0j.js";
28
- import"./index-yb2wsc7f.js";
8
+ } from "./index-ft1sfjz0.js";
9
+ import"./index-k1n0h7dk.js";
10
+ import"./index-ayy5ecax.js";
11
+ import"./index-6wwzs1bc.js";
12
+ import {
13
+ ApplicationScript
14
+ } from "./index-f7wewj2v.js";
15
+ import"./index-xxe90kqy.js";
16
+ import"./index-ctphds8v.js";
17
+ import {
18
+ AbstractDoc
19
+ } from "./index-meh558jy.js";
20
+ import"./index-xnhf8tr9.js";
21
+ import {
22
+ getMobileTargetChoices
23
+ } from "./index-47pj3aee.js";
29
24
 
30
25
  // pkgs/@akanjs/cli/application/application.command.ts
31
26
  import { select } from "@inquirer/prompts";
@@ -97,15 +92,15 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
97
92
  enum: ["local", "debug", "develop", "main"],
98
93
  desc: "backend environment",
99
94
  default: "debug"
100
- }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).exec(async function(app, target2, env, write, regenerate) {
101
- await this.applicationScript.buildIos(app, { target: target2, env, write, regenerate });
95
+ }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).exec(async function(app, target, env, write, regenerate) {
96
+ await this.applicationScript.buildIos(app, { target, env, write, regenerate });
102
97
  }),
103
98
  buildAndroid: target({ short: true, desc: "Build Android app with Capacitor" }).with(App).option("target", String, mobileTargetOption).option("env", String, {
104
99
  enum: ["local", "debug", "develop", "main"],
105
100
  desc: "backend environment",
106
101
  default: "debug"
107
- }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).exec(async function(app, target2, env, write, regenerate) {
108
- await this.applicationScript.buildAndroid(app, { target: target2, env, write, regenerate });
102
+ }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).exec(async function(app, target, env, write, regenerate) {
103
+ await this.applicationScript.buildAndroid(app, { target, env, write, regenerate });
109
104
  }),
110
105
  start: target({ short: true, desc: "Start development server (frontend SSR + backend)" }).with(App).option("open", Boolean, { desc: "open web browser?", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, open, write) {
111
106
  await this.applicationScript.start(app, { open, write });
@@ -120,9 +115,9 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
120
115
  }).option("device", String, {
121
116
  desc: "run target to select non-interactively: udid, device name, or runtime (e.g. 'iPhone 16' or 'iOS 18')",
122
117
  default: ""
123
- }).exec(async function(app, target2, env, open, release, write, regenerate, noAllowProvisioningUpdates, device) {
118
+ }).exec(async function(app, target, env, open, release, write, regenerate, noAllowProvisioningUpdates, device) {
124
119
  await this.applicationScript.startIos(app, {
125
- target: target2,
120
+ target,
126
121
  env,
127
122
  open,
128
123
  operation: release ? "release" : "local",
@@ -136,9 +131,9 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
136
131
  enum: ["local", "debug", "develop", "main"],
137
132
  desc: "backend environment",
138
133
  default: "local"
139
- }).option("release", Boolean, { desc: "release mode", default: false }).option("open", Boolean, { desc: "open android simulator", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).exec(async function(app, target2, env, release, open, write, regenerate) {
134
+ }).option("release", Boolean, { desc: "release mode", default: false }).option("open", Boolean, { desc: "open android simulator", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).exec(async function(app, target, env, release, open, write, regenerate) {
140
135
  await this.applicationScript.startAndroid(app, {
141
- target: target2,
136
+ target,
142
137
  env,
143
138
  open,
144
139
  operation: release ? "release" : "local",
@@ -150,9 +145,9 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
150
145
  enum: ["debug", "develop", "main", "local"],
151
146
  desc: "backend environment",
152
147
  default: "main"
153
- }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow release with --env local", default: false }).exec(async function(app, target2, env, write, regenerate, allowLocalRelease) {
148
+ }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow release with --env local", default: false }).exec(async function(app, target, env, write, regenerate, allowLocalRelease) {
154
149
  await this.applicationScript.releaseIos(app, {
155
- target: target2,
150
+ target,
156
151
  env,
157
152
  write,
158
153
  regenerate,
@@ -163,9 +158,9 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
163
158
  enum: ["debug", "develop", "main", "local"],
164
159
  desc: "backend environment",
165
160
  default: "main"
166
- }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow release with --env local", default: false }).exec(async function(app, assembleType, target2, env, write, regenerate, allowLocalRelease) {
161
+ }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow release with --env local", default: false }).exec(async function(app, assembleType, target, env, write, regenerate, allowLocalRelease) {
167
162
  await this.applicationScript.releaseAndroid(app, assembleType, {
168
- target: target2,
163
+ target,
169
164
  env,
170
165
  write,
171
166
  regenerate,
@@ -1,19 +1,17 @@
1
1
  // @bun
2
+ import {
3
+ Spinner
4
+ } from "./index-k1n0h7dk.js";
2
5
  import {
3
6
  AllRoutesBuilder,
4
7
  CsrArtifactBuilder,
5
8
  FontPruner,
6
- SsrBaseArtifactBuilder,
7
- precompressArtifacts
8
- } from "./index-25qfm3at.js";
9
- import"./index-scemmfpj.js";
10
- import"./index-jcm6zr20.js";
11
- import"./index-5vy2jzar.js";
12
- import"./index-dp66vwr6.js";
13
- import {
14
- Spinner
15
- } from "./index-mxvakhsm.js";
16
- import"./index-yb2wsc7f.js";
9
+ precompressArtifacts,
10
+ SsrBaseArtifactBuilder
11
+ } from "./index-z3c9mmw4.js";
12
+ import"./index-x23688ar.js";
13
+ import"./index-ctphds8v.js";
14
+ import"./index-n68jx79w.js";
17
15
 
18
16
  // pkgs/@akanjs/devkit/applicationBuildRunner.ts
19
17
  import { mkdir, rm } from "fs/promises";
@@ -292,6 +290,5 @@ void run().catch((error) => {
292
290
  }
293
291
  }
294
292
  export {
295
- AKAN_OPTIONAL_BACKEND_EXTERNALS,
296
293
  ApplicationBuildRunner
297
294
  };
@@ -1,11 +1,10 @@
1
1
  // @bun
2
- import {
3
- Spinner
4
- } from "./index-mxvakhsm.js";
5
2
  import {
6
3
  FileSys
7
- } from "./index-67546d0j.js";
8
- import"./index-yb2wsc7f.js";
4
+ } from "./index-ayy5ecax.js";
5
+ import {
6
+ Spinner
7
+ } from "./index-k1n0h7dk.js";
9
8
 
10
9
  // pkgs/@akanjs/devkit/applicationReleasePackager.ts
11
10
  import { cp, mkdir, rm } from "fs/promises";
@@ -54,7 +53,7 @@ var uploadRelease = async (appName, {
54
53
  preparingFormSpinner.succeed("Preparing form data... done");
55
54
  try {
56
55
  const uploadingFilesSpinner = spinning("Uploading files to server...");
57
- const [buildFile2, sourceFile2, appBuildFile2] = await httpClient.post("/file/addFiles", formData);
56
+ const [buildFile, sourceFile, appBuildFile] = await httpClient.post("/file/addFiles", formData);
58
57
  uploadingFilesSpinner.succeed("Uploading files to server... done");
59
58
  const fetchingAppSpinner = spinning(`Fetching dev app information for ${appName}...`);
60
59
  const major = platformVersion ? parseInt(platformVersion.split(".")[0]) : 1;
@@ -63,7 +62,7 @@ var uploadRelease = async (appName, {
63
62
  const devApp = await httpClient.get(`/devApp/devAppInName/${appName}`);
64
63
  fetchingAppSpinner.succeed(`Fetching dev app information for ${appName}... done`);
65
64
  const pushingReleaseSpinner = spinning(`Pushing release to ${environment} environment...`);
66
- const release = await httpClient.post(`/release/pushRelease/${devApp.id}/${environment}/${major}/${minor}/${patch}/${sourceFile2.id}/${buildFile2.id}/${appBuildFile2.id}${os ? `/${os}` : ""}`);
65
+ const release = await httpClient.post(`/release/pushRelease/${devApp.id}/${environment}/${major}/${minor}/${patch}/${sourceFile.id}/${buildFile.id}/${appBuildFile.id}${os ? `/${os}` : ""}`);
67
66
  pushingReleaseSpinner.succeed(`Pushing release to ${environment} environment... done`);
68
67
  new Spinner(`Successfully pushed release to ${appName}-${environment} server. `, {
69
68
  prefix: `Successfully pushed release to ${appName}-${environment} server. `,
@@ -1,23 +1,20 @@
1
1
  // @bun
2
2
  import {
3
- CsrArtifactBuilder,
3
+ WorkspaceExecutor,
4
+ AppExecutor
5
+ } from "./index-k1n0h7dk.js";
6
+ import"./index-ayy5ecax.js";
7
+ import"./index-6wwzs1bc.js";
8
+ import {
4
9
  CssCompiler,
5
- FontOptimizer,
6
10
  PagesBundleBuilder,
11
+ CsrArtifactBuilder,
12
+ FontOptimizer,
7
13
  SsrBaseArtifactBuilder
8
- } from "./index-25qfm3at.js";
9
- import"./index-scemmfpj.js";
10
- import"./index-jcm6zr20.js";
11
- import"./index-5vy2jzar.js";
12
- import {
13
- AppExecutor,
14
- WorkspaceExecutor
15
- } from "./index-zkrzv21w.js";
16
- import"./index-dp66vwr6.js";
17
- import"./index-mxvakhsm.js";
18
- import"./index-1577bej2.js";
19
- import"./index-67546d0j.js";
20
- import"./index-yb2wsc7f.js";
14
+ } from "./index-z3c9mmw4.js";
15
+ import"./index-x23688ar.js";
16
+ import"./index-ctphds8v.js";
17
+ import"./index-n68jx79w.js";
21
18
 
22
19
  // pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
23
20
  import path from "path";
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import {
3
+ isPlaceholderAppId2,
4
+ CapacitorApp2
5
+ } from "./index-b2nt0w0k.js";
6
+ import"./index-k1n0h7dk.js";
7
+ import"./index-6wwzs1bc.js";
8
+ import"./index-ayy5ecax.js";
9
+ export {
10
+ CapacitorApp2 as CapacitorApp,
11
+ isPlaceholderAppId2 as isPlaceholderAppId
12
+ };
@@ -1,30 +1,24 @@
1
1
  // @bun
2
- import {
3
- CloudScript
4
- } from "./index-psx0z6hb.js";
5
- import"./index-dz1q44m8.js";
6
- import"./index-ffrhjdwd.js";
2
+ import"./index-ayy5ecax.js";
7
3
  import {
8
4
  GlobalConfig
9
- } from "./index-safgeq9a.js";
10
- import"./index-zp0cmfgd.js";
11
- import"./index-7605ykh6.js";
12
- import"./index-jn9b717k.js";
13
- import"./index-19nz5chq.js";
14
- import"./index-76rn3g2c.js";
5
+ } from "./index-wet2ytnr.js";
15
6
  import {
16
7
  Workspace,
17
8
  command
18
- } from "./index-1szrbtj9.js";
19
- import"./index-ynf37b66.js";
20
- import"./index-5vy2jzar.js";
21
- import"./index-zkrzv21w.js";
22
- import"./index-dp66vwr6.js";
23
- import"./index-mxvakhsm.js";
24
- import"./index-1577bej2.js";
25
- import"./index-h5sr2nnj.js";
26
- import"./index-67546d0j.js";
27
- import"./index-yb2wsc7f.js";
9
+ } from "./index-ft1sfjz0.js";
10
+ import"./index-k1n0h7dk.js";
11
+ import"./index-6wwzs1bc.js";
12
+ import"./index-f7wewj2v.js";
13
+ import"./index-xxe90kqy.js";
14
+ import"./index-ctphds8v.js";
15
+ import"./index-mfm35dhh.js";
16
+ import"./index-a8h184wr.js";
17
+ import"./index-3c9n3nt8.js";
18
+ import {
19
+ CloudScript
20
+ } from "./index-ee8z8adx.js";
21
+ import"./index-xnhf8tr9.js";
28
22
 
29
23
  // pkgs/@akanjs/cli/cloud/cloud.command.ts
30
24
  var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
@@ -1,31 +1,26 @@
1
1
  // @bun
2
- import {
3
- ContextScript
4
- } from "./index-pzsryyjv.js";
5
- import"./index-qwfwk8be.js";
6
- import"./index-egng0kc4.js";
7
- import"./index-ta1mk0xh.js";
8
- import"./index-47zynjx7.js";
9
- import"./index-pj3hk9kt.js";
10
- import"./index-ss469dec.js";
11
- import"./index-yz8988we.js";
12
- import"./index-zec5gcx0.js";
13
- import"./index-safgeq9a.js";
14
- import"./index-w0g7hcr7.js";
15
- import"./index-k7731a4v.js";
16
- import"./index-6w77v5df.js";
17
- import"./index-76rn3g2c.js";
18
2
  import {
19
3
  Workspace,
20
4
  command
21
- } from "./index-1szrbtj9.js";
22
- import"./index-zkrzv21w.js";
23
- import"./index-dp66vwr6.js";
24
- import"./index-mxvakhsm.js";
25
- import"./index-xys926f2.js";
26
- import"./index-1577bej2.js";
27
- import"./index-67546d0j.js";
28
- import"./index-yb2wsc7f.js";
5
+ } from "./index-ft1sfjz0.js";
6
+ import"./index-k1n0h7dk.js";
7
+ import"./index-ayy5ecax.js";
8
+ import"./index-6wwzs1bc.js";
9
+ import"./index-by5gpp8x.js";
10
+ import"./index-saheq2bs.js";
11
+ import"./index-5y7qba1c.js";
12
+ import {
13
+ ContextScript
14
+ } from "./index-dq6wq1tv.js";
15
+ import"./index-b2nt0w0k.js";
16
+ import"./index-h7yw2z9n.js";
17
+ import"./index-qcracvc9.js";
18
+ import"./index-j9vnq8tr.js";
19
+ import"./index-wet2ytnr.js";
20
+ import"./index-k86zc21w.js";
21
+ import"./index-1kzsn94d.js";
22
+ import"./index-cd5x18qh.js";
23
+ import"./index-v0s24t8j.js";
29
24
 
30
25
  // pkgs/@akanjs/cli/context/context.command.ts
31
26
  class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import {
3
+ TypeScriptDependencyScanner2
4
+ } from "./index-mfm35dhh.js";
5
+ import"./index-ayy5ecax.js";
6
+ export {
7
+ TypeScriptDependencyScanner2 as TypeScriptDependencyScanner
8
+ };
@@ -1,28 +1,26 @@
1
1
  // @bun
2
- import {
3
- SlicePlanner
4
- } from "./index-jn9b717k.js";
5
- import {
6
- LibSource
7
- } from "./index-19nz5chq.js";
8
2
  import {
9
3
  Workspace,
10
- command,
11
4
  runner,
12
- script
13
- } from "./index-1szrbtj9.js";
5
+ script,
6
+ command
7
+ } from "./index-ft1sfjz0.js";
14
8
  import {
15
- AppExecutor,
16
9
  Executor,
10
+ WorkspaceExecutor,
11
+ AppExecutor,
17
12
  LibExecutor
18
- } from "./index-zkrzv21w.js";
19
- import"./index-dp66vwr6.js";
20
- import"./index-mxvakhsm.js";
21
- import"./index-1577bej2.js";
13
+ } from "./index-k1n0h7dk.js";
22
14
  import {
23
15
  FileSys
24
- } from "./index-67546d0j.js";
25
- import"./index-yb2wsc7f.js";
16
+ } from "./index-ayy5ecax.js";
17
+ import"./index-6wwzs1bc.js";
18
+ import {
19
+ SlicePlanner
20
+ } from "./index-xnhf8tr9.js";
21
+ import {
22
+ LibSource
23
+ } from "./index-3d9y066c.js";
26
24
 
27
25
  // pkgs/@akanjs/devkit/fleetGuard.ts
28
26
  import path from "path";
@@ -310,6 +308,36 @@ class FleetSpoke {
310
308
  const excludeArgs = excludes.map((entry) => `--exclude='${entry}'`).join(" ");
311
309
  await this.#workspace.exec(`git archive HEAD -- ${pathspec} | tar -x -C '${this.#clonePath}' ${excludeArgs}`.trim());
312
310
  }
311
+ #localEnv() {
312
+ const { serveDomain } = WorkspaceExecutor.getBaseDevEnv();
313
+ return {
314
+ AKAN_WORKSPACE_ID: "local",
315
+ AKAN_PUBLIC_REPO_NAME: this.name,
316
+ AKAN_PUBLIC_SERVE_DOMAIN: serveDomain,
317
+ AKAN_PUBLIC_ENV: "local",
318
+ AKAN_PUBLIC_OPERATION_MODE: "local",
319
+ AKAN_PUBLIC_LOG_LEVEL: "warn"
320
+ };
321
+ }
322
+ async#writeLocalEnv() {
323
+ const excludePath = path2.join(this.#clonePath, ".git/info/exclude");
324
+ const exclude = await FileSys.fileExists(excludePath) ? await FileSys.readText(excludePath) : "";
325
+ if (!exclude.split(`
326
+ `).includes("/.env")) {
327
+ await mkdir(path2.dirname(excludePath), { recursive: true });
328
+ await FileSys.writeText(excludePath, exclude.trim() ? `${exclude.replace(/\n*$/, `
329
+ `)}/.env
330
+ ` : `/.env
331
+ `);
332
+ }
333
+ const envPath = path2.join(this.#clonePath, ".env");
334
+ if (await FileSys.fileExists(envPath))
335
+ return;
336
+ const lines = Object.entries(this.#localEnv()).map(([key, value]) => `${key}=${value}`);
337
+ await FileSys.writeText(envPath, `${lines.join(`
338
+ `)}
339
+ `);
340
+ }
313
341
  async#applySlice(clone, branch) {
314
342
  const { libs, paths } = await this.slice();
315
343
  const held = await this.#holdSpokeOwned();
@@ -323,6 +351,7 @@ class FleetSpoke {
323
351
  await this.#rewriteGitignore();
324
352
  await this.#rewriteWorkspaceSection(libs);
325
353
  await this.#writeGuards();
354
+ await this.#writeLocalEnv();
326
355
  for (const lib of libs)
327
356
  await this.#stampLib(clone, lib, branch);
328
357
  return { libs };
@@ -455,6 +484,17 @@ class FleetSpoke {
455
484
  `;
456
485
  await FileSys.writeText(hookPath, content);
457
486
  }
487
+ async#verify(clone) {
488
+ const env = { ...process.env, ...this.#localEnv() };
489
+ try {
490
+ await clone.spawn("bun", ["install"], { env });
491
+ for (const app of this.#declaration.apps)
492
+ await clone.spawn("bunx", ["akan", "sync", app], { env });
493
+ return null;
494
+ } catch (error) {
495
+ return error instanceof Error ? error.message : String(error);
496
+ }
497
+ }
458
498
  async push(branch, { verify = true } = {}) {
459
499
  this.#config.assertPushable(branch);
460
500
  if (await this.#workspace.hasChanges())
@@ -466,12 +506,14 @@ class FleetSpoke {
466
506
  const dirty = (await clone.spawn("git", ["status", "--porcelain"])).trim();
467
507
  if (!dirty)
468
508
  return { name: this.name, outcome: "skipped", reason: "already up to date", changedFiles: 0 };
469
- await this.#writeAnchorFile(branch);
509
+ const changedFiles = dirty.split(`
510
+ `).length;
470
511
  if (verify) {
471
- await clone.spawn("bun", ["install"]);
472
- for (const app of this.#declaration.apps)
473
- await clone.spawn("bunx", ["akan", "sync", app]);
512
+ const failure = await this.#verify(clone);
513
+ if (failure)
514
+ return { name: this.name, outcome: "refused", reason: failure, changedFiles };
474
515
  }
516
+ await this.#writeAnchorFile(branch);
475
517
  await clone.spawn("git", ["add", "-A"]);
476
518
  const message = `chore(fleet): sync from ${this.#workspace.repoName}@${await this.headSha()}`;
477
519
  await clone.spawn("git", ["commit", "--quiet", "-m", message]);
@@ -480,8 +522,7 @@ class FleetSpoke {
480
522
  name: this.name,
481
523
  outcome: "pushed",
482
524
  commit: (await clone.spawn("git", ["rev-parse", "--short", "HEAD"])).trim(),
483
- changedFiles: dirty.split(`
484
- `).length
525
+ changedFiles
485
526
  };
486
527
  }
487
528
  async#writeAnchorFile(branch) {
@@ -551,9 +592,11 @@ function formatFleetPushResults(results) {
551
592
  const sections = [
552
593
  "Akan Fleet Push",
553
594
  "",
554
- ...results.map((result) => {
595
+ ...results.flatMap((result) => {
555
596
  const detail = result.outcome === "pushed" ? `${result.commit} (${result.changedFiles} files)` : result.reason ?? "";
556
- return ` ${result.outcome.padEnd(8)} ${result.name} ${detail}`;
597
+ const [first = "", ...rest] = detail.split(`
598
+ `);
599
+ return [` ${result.outcome.padEnd(8)} ${result.name} ${first}`, ...rest.map((line) => ` ${line}`)];
557
600
  })
558
601
  ];
559
602
  return sections.join(`
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import {
3
+ getDirname2
4
+ } from "./index-6wwzs1bc.js";
5
+ export {
6
+ getDirname2 as getDirname
7
+ };
@@ -1,26 +1,23 @@
1
1
  // @bun
2
- import {
3
- AiSession
4
- } from "./index-safgeq9a.js";
5
- import {
6
- Prompter
7
- } from "./index-k7731a4v.js";
8
2
  import {
9
3
  Workspace,
10
- command,
11
4
  runner,
12
- script
13
- } from "./index-1szrbtj9.js";
14
- import"./index-zkrzv21w.js";
15
- import"./index-dp66vwr6.js";
16
- import"./index-mxvakhsm.js";
17
- import {
18
- getDirname
19
- } from "./index-1577bej2.js";
5
+ script,
6
+ command
7
+ } from "./index-ft1sfjz0.js";
8
+ import"./index-k1n0h7dk.js";
20
9
  import {
21
10
  FileSys
22
- } from "./index-67546d0j.js";
23
- import"./index-yb2wsc7f.js";
11
+ } from "./index-ayy5ecax.js";
12
+ import {
13
+ getDirname2
14
+ } from "./index-6wwzs1bc.js";
15
+ import {
16
+ Prompter
17
+ } from "./index-h7yw2z9n.js";
18
+ import {
19
+ AiSession
20
+ } from "./index-wet2ytnr.js";
24
21
 
25
22
  // pkgs/@akanjs/cli/guideline/guideline.script.ts
26
23
  import { Logger } from "akanjs/common";
@@ -66,7 +63,7 @@ class GuidelinePrompt extends Prompter {
66
63
  const scanResult = await Promise.all(targetFilePaths.map(async (filePath) => ({ ...scan, ...await this.workspace.getLocalFile(filePath) })));
67
64
  scanFiles.push(...scanResult);
68
65
  }
69
- const resultPath = `${getDirname(import.meta.url)}/../guidelines/${this.name}/${guideJson.update.filePath}`;
66
+ const resultPath = `${getDirname2(import.meta.url)}/../guidelines/${this.name}/${guideJson.update.filePath}`;
70
67
  const writePath = `${this.workspace.workspaceRoot}/pkgs/@akanjs/cli/guidelines/${this.name}/${guideJson.update.filePath}`;
71
68
  const isResultExists = await this.workspace.exists(writePath);
72
69
  const existingResult = isResultExists ? await this.workspace.readFile(resultPath) : null;
@@ -108,7 +105,7 @@ ${guideJson.update.rules.map((rule) => `- ${rule}`).join(`
108
105
  }
109
106
  async requestUpdateInstruction(updateRequest) {
110
107
  const guideJson = await Prompter.getGuideJson(this.name);
111
- const resultPath = `${getDirname(import.meta.url)}/../guidelines/${this.name}/${guideJson.update.filePath}`;
108
+ const resultPath = `${getDirname2(import.meta.url)}/../guidelines/${this.name}/${guideJson.update.filePath}`;
112
109
  const writePath = `${this.workspace.workspaceRoot}/pkgs/@akanjs/cli/guidelines/${this.name}/${guideJson.update.filePath}`;
113
110
  const isResultExists = await this.workspace.exists(writePath);
114
111
  if (!isResultExists)