@akanjs/cli 2.4.0 → 2.4.1-rc.0

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 (59) hide show
  1. package/agent.command-h4afc69n.js +26 -0
  2. package/application.command-4ctkfdan.js +165 -0
  3. package/applicationBuildRunner-esa1kj7v.js +284 -0
  4. package/applicationReleasePackager-brvth6rs.js +245 -0
  5. package/capacitorApp-y0h6cgft.js +58 -0
  6. package/cloud.command-rpztn4fh.js +94 -0
  7. package/commandManifest.json +1 -0
  8. package/context.command-nqbtak4f.js +82 -0
  9. package/dependencyScanner-m4x5maek.js +9 -0
  10. package/guideline.command-ya0dh44f.js +356 -0
  11. package/incrementalBuilder.proc.js +89 -17394
  12. package/index-1xdrsbry.js +1447 -0
  13. package/index-45aj5ry0.js +990 -0
  14. package/index-5vvwc0cz.js +559 -0
  15. package/index-61keag0s.js +40 -0
  16. package/index-6pz1j0zj.js +62 -0
  17. package/index-73pr2cmy.js +534 -0
  18. package/index-76rn3g2c.js +76 -0
  19. package/index-85msc0wg.js +161 -0
  20. package/index-8pkbzj26.js +840 -0
  21. package/index-8rc0bm04.js +514 -0
  22. package/index-9sp6fsc5.js +1884 -0
  23. package/index-a6sbyy0b.js +2769 -0
  24. package/index-b0brjbp3.js +83 -0
  25. package/index-fgc8r6dj.js +33 -0
  26. package/index-h6ca6qg0.js +2777 -0
  27. package/index-hdqztm58.js +758 -0
  28. package/index-hwzpw9c1.js +202 -0
  29. package/index-pmm9e2jf.js +120 -0
  30. package/index-qaq13qk3.js +80 -0
  31. package/index-qhtr07v8.js +1072 -0
  32. package/index-r24hmh0q.js +4 -0
  33. package/index-ss469dec.js +11 -0
  34. package/index-swf4bmbg.js +25 -0
  35. package/index-w7fyqjrw.js +462 -0
  36. package/index-wnp7hwq7.js +193 -0
  37. package/index-wq8jwx8z.js +224 -0
  38. package/index-x53a5nya.js +301 -0
  39. package/index-xmc2w32q.js +4359 -0
  40. package/index-y3hdhy4p.js +229 -0
  41. package/index.js +54 -23340
  42. package/library.command-r15zdqvp.js +33 -0
  43. package/localRegistry.command-5tcahs3f.js +178 -0
  44. package/module.command-qrj3kmyz.js +54 -0
  45. package/package.command-r8sq5kzp.js +43 -0
  46. package/package.json +2 -2
  47. package/page.command-c6xdx0xm.js +24 -0
  48. package/primitive.command-pv9ssmtf.js +62 -0
  49. package/quality.command-es67wvdp.js +809 -0
  50. package/repair.command-677675vw.js +67 -0
  51. package/routeSourceValidator-wbhmbwpj.js +132 -0
  52. package/scalar.command-kabkd6wd.js +35 -0
  53. package/templates/facetIndex/index.ts +1 -1
  54. package/typeChecker-kravn7ns.js +8 -0
  55. package/typecheck.proc.js +4 -194
  56. package/workflow.command-64r6cw0w.js +108 -0
  57. package/workspace.command-vrws0rgx.js +435 -0
  58. package/README.ko.md +0 -72
  59. package/README.md +0 -85
@@ -0,0 +1,245 @@
1
+ // @bun
2
+ import {
3
+ FileSys
4
+ } from "./index-61keag0s.js";
5
+ import {
6
+ Spinner
7
+ } from "./index-6pz1j0zj.js";
8
+ import"./index-r24hmh0q.js";
9
+
10
+ // pkgs/@akanjs/devkit/applicationReleasePackager.ts
11
+ import { cp, mkdir, rm } from "fs/promises";
12
+ import path from "path";
13
+
14
+ // pkgs/@akanjs/devkit/uploadRelease.ts
15
+ import { HttpClient, Logger } from "akanjs/common";
16
+ var spinning = (message) => {
17
+ const spinner = new Spinner(message, { prefix: message, enableSpin: true }).start();
18
+ return spinner;
19
+ };
20
+ var uploadRelease = async (appName, {
21
+ workspaceRoot,
22
+ environment,
23
+ buildNum,
24
+ platformVersion,
25
+ os,
26
+ local
27
+ }) => {
28
+ const logger = new Logger("uploadRelease");
29
+ const basePath = local ? "http://localhost:8282/backend" : "https://cloud.akanjs.com/backend";
30
+ const httpClient = new HttpClient(basePath);
31
+ const buildPath = `${workspaceRoot}/releases/builds/${appName}-release.tar.gz`;
32
+ const appBuildPath = `${workspaceRoot}/releases/builds/${appName}-appBuild.zip`;
33
+ const sourcePath = `${workspaceRoot}/releases/sources/${appName}-source.tar.gz`;
34
+ const readingFilesSpinner = spinning("Reading files...");
35
+ try {
36
+ const buildFile = Bun.file(buildPath);
37
+ const sourceFile = Bun.file(sourcePath);
38
+ const appBuildFile = Bun.file(appBuildPath);
39
+ const buildStat = { mtime: new Date(buildFile.lastModified), size: buildFile.size };
40
+ const sourceStat = { mtime: new Date(sourceFile.lastModified), size: sourceFile.size };
41
+ const appBuildStat = { mtime: new Date(appBuildFile.lastModified), size: appBuildFile.size };
42
+ readingFilesSpinner.succeed("Reading files... done");
43
+ const preparingFormSpinner = spinning("Preparing form data...");
44
+ const formData = new FormData;
45
+ formData.append("files", buildFile, `${appName}-release.tar.gz`);
46
+ formData.append("files", sourceFile, `${appName}-source.tar.gz`);
47
+ formData.append("files", appBuildFile, `${appName}-appBuild.zip`);
48
+ formData.append("metas", JSON.stringify([
49
+ { lastModifiedAt: buildStat.mtime, size: buildStat.size },
50
+ { lastModifiedAt: sourceStat.mtime, size: sourceStat.size },
51
+ { lastModifiedAt: appBuildStat.mtime, size: appBuildStat.size }
52
+ ]));
53
+ formData.append("type", "release");
54
+ preparingFormSpinner.succeed("Preparing form data... done");
55
+ try {
56
+ const uploadingFilesSpinner = spinning("Uploading files to server...");
57
+ const [buildFile2, sourceFile2, appBuildFile2] = await httpClient.post("/file/addFiles", formData);
58
+ uploadingFilesSpinner.succeed("Uploading files to server... done");
59
+ const fetchingAppSpinner = spinning(`Fetching dev app information for ${appName}...`);
60
+ const major = platformVersion ? parseInt(platformVersion.split(".")[0]) : 1;
61
+ const minor = platformVersion ? parseInt(platformVersion.split(".")[1]) : 0;
62
+ const patch = platformVersion ? parseInt(platformVersion.split(".")[2]) : 0;
63
+ const devApp = await httpClient.get(`/devApp/devAppInName/${appName}`);
64
+ fetchingAppSpinner.succeed(`Fetching dev app information for ${appName}... done`);
65
+ 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}` : ""}`);
67
+ pushingReleaseSpinner.succeed(`Pushing release to ${environment} environment... done`);
68
+ new Spinner(`Successfully pushed release to ${appName}-${environment} server. `, {
69
+ prefix: `Successfully pushed release to ${appName}-${environment} server. `,
70
+ enableSpin: false
71
+ }).succeed(`Successfully pushed release to ${appName}-${environment} server. `);
72
+ return release;
73
+ } catch (e) {
74
+ const errorMessage = e instanceof Error ? e.message : "Unknown error";
75
+ logger.error(`Upload release failed: ${errorMessage}`);
76
+ return null;
77
+ }
78
+ } catch (e) {
79
+ const errorMessage = e instanceof Error ? e.message : "Unknown error";
80
+ readingFilesSpinner.fail(`Reading files failed: ${errorMessage}`);
81
+ return null;
82
+ }
83
+ };
84
+
85
+ // pkgs/@akanjs/devkit/applicationReleasePackager.ts
86
+ class ApplicationReleasePackager {
87
+ #app;
88
+ #build;
89
+ constructor(app, options) {
90
+ this.#app = app;
91
+ this.#build = options.build;
92
+ }
93
+ async releaseSource({
94
+ rebuild,
95
+ buildNum = 0,
96
+ environment = "debug",
97
+ local = true
98
+ } = {}) {
99
+ const { platformVersion } = await this.#prepareReleaseBuild({ rebuild, buildNum });
100
+ await this.#writeSourceArchive({ readme: this.#confidentialReadme() });
101
+ await uploadRelease(this.#app.name, {
102
+ local,
103
+ buildNum,
104
+ environment,
105
+ platformVersion,
106
+ workspaceRoot: this.#app.workspace.cwdPath
107
+ });
108
+ }
109
+ async compressProjectFiles({ rebuild, buildNum = 0 } = {}) {
110
+ await this.#prepareReleaseBuild({ rebuild, buildNum });
111
+ await this.#writeSourceArchive({ readme: this.#publicReadme() });
112
+ }
113
+ async#prepareReleaseBuild({ rebuild, buildNum }) {
114
+ const akanConfig = await this.#app.getConfig();
115
+ const platformVersion = akanConfig.mobile.version;
116
+ const buildRoot = `${this.#app.workspace.workspaceRoot}/releases/builds/${this.#app.name}`;
117
+ if (await FileSys.dirExists(buildRoot))
118
+ await rm(buildRoot, { recursive: true, force: true });
119
+ await mkdir(buildRoot, { recursive: true });
120
+ if (rebuild || !await FileSys.dirExists(`${this.#app.dist.cwdPath}/backend`))
121
+ await this.#build();
122
+ const buildVersion = `${platformVersion}-${buildNum}`;
123
+ const buildPath = `${buildRoot}/${buildVersion}`;
124
+ await mkdir(buildPath, { recursive: true });
125
+ await cp(`${this.#app.dist.cwdPath}/backend`, `${buildPath}/backend`, { recursive: true });
126
+ await cp(this.#app.dist.cwdPath, buildRoot, { recursive: true });
127
+ await rm(`${buildRoot}/frontend/.next`, { recursive: true, force: true });
128
+ const releaseRoot = this.#app.workspace.workspaceRoot;
129
+ const releaseArchivePath = path.relative(releaseRoot, `${releaseRoot}/releases/builds/${this.#app.name}-release.tar.gz`).split(path.sep).join("/");
130
+ await this.#app.workspace.spawn("tar", ["-zcf", releaseArchivePath, "-C", buildRoot, "./"], { cwd: releaseRoot });
131
+ await this.#writeCsrZipIfPresent();
132
+ return { platformVersion };
133
+ }
134
+ async#writeCsrZipIfPresent() {
135
+ if (!await FileSys.dirExists(`${this.#app.dist.cwdPath}/csr`))
136
+ return;
137
+ await cp(`${this.#app.dist.cwdPath}/csr`, "./csr", { recursive: true });
138
+ await this.#app.workspace.spawn("zip", [
139
+ "-r",
140
+ `${this.#app.workspace.workspaceRoot}/releases/builds/${this.#app.name}-appBuild.zip`,
141
+ "./csr"
142
+ ]);
143
+ await rm("./csr", { recursive: true, force: true });
144
+ }
145
+ async#writeSourceArchive({ readme }) {
146
+ const sourceRoot = `${this.#app.workspace.workspaceRoot}/releases/sources/${this.#app.name}`;
147
+ await this.#resetSourceRoot(sourceRoot);
148
+ await cp(this.#app.dist.cwdPath, `${sourceRoot}/apps/${this.#app.name}`, { recursive: true });
149
+ const libDeps = ["social", "shared", "platform", "util"];
150
+ await Promise.all(libDeps.map((lib) => cp(`${this.#app.workspace.cwdPath}/libs/${lib}`, `${sourceRoot}/libs/${lib}`, { recursive: true })));
151
+ await Promise.all([".next", "ios", "android", "public/libs"].map(async (path2) => {
152
+ const targetPath = `${sourceRoot}/apps/${this.#app.name}/${path2}`;
153
+ if (await FileSys.dirExists(targetPath))
154
+ await rm(targetPath, { recursive: true, force: true });
155
+ }));
156
+ const syncPaths = [".husky", ".gitignore", "package.json"];
157
+ await Promise.all(syncPaths.map((path2) => cp(`${this.#app.workspace.cwdPath}/${path2}`, `${sourceRoot}/${path2}`, { recursive: true })));
158
+ await this.#writeSourceTsconfig(sourceRoot, libDeps);
159
+ await Bun.write(`${sourceRoot}/README.md`, readme);
160
+ const sourceCwd = this.#app.workspace.cwdPath;
161
+ const sourceArchivePath = path.relative(sourceCwd, `${sourceCwd}/releases/sources/${this.#app.name}-source.tar.gz`).split(path.sep).join("/");
162
+ await this.#app.workspace.spawn("tar", ["-zcf", sourceArchivePath, "-C", sourceRoot, "./"], { cwd: sourceCwd });
163
+ }
164
+ async#resetSourceRoot(sourceRoot) {
165
+ if (await FileSys.dirExists(sourceRoot)) {
166
+ const maxRetry = 3;
167
+ for (let i = 0;i < maxRetry; i++) {
168
+ try {
169
+ await rm(sourceRoot, { recursive: true, force: true });
170
+ } catch {}
171
+ }
172
+ }
173
+ await mkdir(sourceRoot, { recursive: true });
174
+ }
175
+ async#writeSourceTsconfig(sourceRoot, libDeps) {
176
+ const tsconfig = await this.#app.workspace.readJson("tsconfig.json");
177
+ const pathEntries = [[`@${this.#app.name}/*`, [`apps/${this.#app.name}/*`]]];
178
+ for (const lib of libDeps) {
179
+ pathEntries.push([`@${lib}`, [`libs/${lib}/index.ts`]], [`@${lib}/*`, [`libs/${lib}/*`]]);
180
+ }
181
+ tsconfig.compilerOptions.paths = Object.fromEntries(pathEntries);
182
+ await Bun.write(`${sourceRoot}/tsconfig.json`, JSON.stringify(tsconfig, null, 2));
183
+ }
184
+ #confidentialReadme() {
185
+ return `# ${this.#app.name}
186
+ \uBCF8 \uD504\uB85C\uC81D\uD2B8\uC758 \uC18C\uC2A4\uCF54\uB4DC \uBC0F \uAD00\uB828\uC790\uB8CC\uB294 \uBAA8\uB450 \uBE44\uBC00\uC815\uBCF4\uB85C \uAD00\uB9AC\uB429\uB2C8\uB2E4.
187
+
188
+ ## Get Started
189
+ Run the code below.
190
+ \`\`\`
191
+ bun install -g bun
192
+ bun i
193
+
194
+ cat <<EOF >> .env
195
+ # ENV For Server => debug | debug.local | develop | develop.local | main | main.local
196
+ SERVER_ENV=debug.local
197
+ # Run Mode For Server => federation | batch | all
198
+ SERVER_MODE=federation
199
+ # ENV For Client => debug | debug.local | develop | develop.local | main | main.local
200
+ AKAN_PUBLIC_CLIENT_ENV=debug.local
201
+ ANALYZE=false
202
+ EOF
203
+
204
+ akn start-backend ${this.#app.name}
205
+ # or akn start-frontend ${this.#app.name}, etc
206
+ \`\`\`
207
+
208
+ ## Build
209
+ Run the code below.
210
+ \`\`\`
211
+ akn build-backend ${this.#app.name}
212
+ # or akn build-frontend ${this.#app.name}, etc
213
+ \`\`\`
214
+ `;
215
+ }
216
+ #publicReadme() {
217
+ return `# ${this.#app.name}
218
+ ## Get Started
219
+ Run the code below.
220
+ \`\`\`
221
+ cat <<EOF >> .env
222
+ # ENV For Server => debug | debug.local | develop | develop.local | main | main.local
223
+ SERVER_ENV=debug.local
224
+ # Run Mode For Server => federation | batch | all
225
+ SERVER_MODE=federation
226
+ # ENV For Client => debug | debug.local | develop | develop.local | main | main.local
227
+ AKAN_PUBLIC_CLIENT_ENV=debug.local
228
+ ANALYZE=false
229
+ EOF
230
+
231
+ akan start ${this.#app.name}
232
+ \`\`\`
233
+
234
+ ## Build
235
+ Run the code below.
236
+ \`\`\`
237
+ akan build ${this.#app.name}
238
+ # or akn build-frontend ${this.#app.name}, etc
239
+ \`\`\`
240
+ `;
241
+ }
242
+ }
243
+ export {
244
+ ApplicationReleasePackager
245
+ };
@@ -0,0 +1,58 @@
1
+ // @bun
2
+ import {
3
+ ANDROID_MIN_SDK_VERSION,
4
+ CapacitorApp,
5
+ PLACEHOLDER_APP_IDS,
6
+ SWIFTUICORE_MIN_IOS_MAJOR,
7
+ assertJsonSerializable,
8
+ buildIosNativeRunCommand,
9
+ classifyIosRunFailure,
10
+ clearRootCapacitorConfigs,
11
+ formatAndroidReleaseSigningError,
12
+ formatIosRunFailureMessage,
13
+ getAdbDeviceStateIssues,
14
+ getMissingAndroidReleaseSigningKeys,
15
+ isPlaceholderAppId,
16
+ materializeCapacitorConfig,
17
+ parseDevicectlDevices,
18
+ parseIosRuntimeMajor,
19
+ parseSimctlDevices,
20
+ raiseGradleMinSdkVersion,
21
+ rootCapacitorConfigFilenames,
22
+ rootCapacitorConfigPaths,
23
+ sanitizeIosNativeRunEnv,
24
+ selectLocalDevHost,
25
+ sortIosRunTargets,
26
+ writeRootCapacitorConfig
27
+ } from "./index-1xdrsbry.js";
28
+ import"./index-76rn3g2c.js";
29
+ import"./index-a6sbyy0b.js";
30
+ import"./index-61keag0s.js";
31
+ import"./index-6pz1j0zj.js";
32
+ import"./index-r24hmh0q.js";
33
+ export {
34
+ writeRootCapacitorConfig,
35
+ sortIosRunTargets,
36
+ selectLocalDevHost,
37
+ sanitizeIosNativeRunEnv,
38
+ rootCapacitorConfigPaths,
39
+ rootCapacitorConfigFilenames,
40
+ raiseGradleMinSdkVersion,
41
+ parseSimctlDevices,
42
+ parseIosRuntimeMajor,
43
+ parseDevicectlDevices,
44
+ materializeCapacitorConfig,
45
+ isPlaceholderAppId,
46
+ getMissingAndroidReleaseSigningKeys,
47
+ getAdbDeviceStateIssues,
48
+ formatIosRunFailureMessage,
49
+ formatAndroidReleaseSigningError,
50
+ clearRootCapacitorConfigs,
51
+ classifyIosRunFailure,
52
+ buildIosNativeRunCommand,
53
+ assertJsonSerializable,
54
+ SWIFTUICORE_MIN_IOS_MAJOR,
55
+ PLACEHOLDER_APP_IDS,
56
+ CapacitorApp,
57
+ ANDROID_MIN_SDK_VERSION
58
+ };
@@ -0,0 +1,94 @@
1
+ // @bun
2
+ import {
3
+ CloudScript
4
+ } from "./index-b0brjbp3.js";
5
+ import"./index-w7fyqjrw.js";
6
+ import"./index-9sp6fsc5.js";
7
+ import"./index-76rn3g2c.js";
8
+ import"./index-pmm9e2jf.js";
9
+ import"./index-wq8jwx8z.js";
10
+ import {
11
+ GlobalConfig
12
+ } from "./index-5vvwc0cz.js";
13
+ import {
14
+ Workspace,
15
+ command
16
+ } from "./index-hdqztm58.js";
17
+ import"./index-fgc8r6dj.js";
18
+ import"./index-a6sbyy0b.js";
19
+ import"./index-x53a5nya.js";
20
+ import"./index-61keag0s.js";
21
+ import"./index-6pz1j0zj.js";
22
+ import"./index-r24hmh0q.js";
23
+
24
+ // pkgs/@akanjs/cli/cloud/cloud.command.ts
25
+ var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
26
+ var resolveRegistryUrl = (registry) => registry === "local" ? localRegistryUrl() : undefined;
27
+
28
+ class CloudCommand extends command("cloud", [CloudScript], ({ public: target }) => ({
29
+ login: target({ desc: "Login to Akan Cloud services" }).option("host", String, { desc: "host of the cloud", default: GlobalConfig.akanCloudHost }).with(Workspace).exec(async function(host, workspace) {
30
+ await this.cloudScript.login(workspace, host);
31
+ }),
32
+ logout: target({ desc: "Logout from Akan Cloud services" }).option("host", String, { desc: "host of the cloud", default: GlobalConfig.akanCloudHost }).with(Workspace).exec(async function(host, workspace) {
33
+ await this.cloudScript.logout(workspace, host);
34
+ }),
35
+ setLlm: target({ desc: "Configure LLM (Large Language Model) API key" }).with(Workspace).exec(async function(workspace) {
36
+ await this.cloudScript.setLlm(workspace);
37
+ }),
38
+ resetLlm: target({ desc: "Reset LLM configuration to default" }).with(Workspace).exec(function(workspace) {
39
+ this.cloudScript.resetLlm(workspace);
40
+ }),
41
+ ask: target({
42
+ devOnly: true,
43
+ desc: "Ask AI assistant a question about your project"
44
+ }).option("question", String, { ask: "question to ask" }).with(Workspace).exec(async function(question, workspace) {
45
+ await this.cloudScript.ask(question, workspace);
46
+ }),
47
+ deployAkan: target({
48
+ devOnly: true,
49
+ desc: "Deploy Akan.js framework to cloud (internal use)"
50
+ }).option("test", Boolean, { desc: "test the deployment", default: true }).option("registry", String, {
51
+ desc: "registry target for publishing Akan packages",
52
+ ask: "Select a registry target",
53
+ enum: [
54
+ { label: "local", value: "local" },
55
+ { label: "npm", value: "npm" }
56
+ ]
57
+ }).with(Workspace).exec(async function(test, registry, workspace) {
58
+ await this.cloudScript.deployAkan(workspace, {
59
+ test,
60
+ registryUrl: resolveRegistryUrl(registry)
61
+ });
62
+ }),
63
+ update: target({ desc: "Update Akan.js framework to the latest version" }).with(Workspace).option("tag", String, {
64
+ desc: "tag of the update",
65
+ default: "latest",
66
+ enum: ["latest", "dev", "canary", "beta", "rc", "alpha"]
67
+ }).option("registry", String, {
68
+ desc: "registry target for resolving Akan packages",
69
+ ask: "Select a registry target",
70
+ enum: [
71
+ { label: "npm", value: "npm" },
72
+ { label: "local", value: "local" }
73
+ ],
74
+ default: process.env.USE_AKANJS_PKGS === "true" ? undefined : "npm"
75
+ }).exec(async function(workspace, tag, registry) {
76
+ await this.cloudScript.update(workspace, tag, {
77
+ registryUrl: resolveRegistryUrl(registry)
78
+ });
79
+ }),
80
+ downloadEnv: target({
81
+ desc: "Download environment variables from cloud or SCP server"
82
+ }).option("host", String, { desc: "host of the cloud to target", default: GlobalConfig.akanCloudHost }).with(Workspace).exec(async function(host, workspace) {
83
+ await this.cloudScript.downloadEnv(workspace, undefined, { host });
84
+ }),
85
+ uploadEnv: target({
86
+ desc: "Upload environment variables to cloud or SCP server"
87
+ }).option("host", String, { desc: "host of the cloud to target", default: GlobalConfig.akanCloudHost }).with(Workspace).exec(async function(host, workspace) {
88
+ await this.cloudScript.uploadEnv(workspace, { host });
89
+ })
90
+ })) {
91
+ }
92
+ export {
93
+ CloudCommand
94
+ };
@@ -0,0 +1 @@
1
+ {"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","create-application":"application","remove-application":"application","sync":"application","script":"application","console":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","release-ios":"application","release-android":"application","release-source":"application","codepush":"application","dbup":"application","dbdown":"application","configure-app":"application","create-library":"library","remove-library":"library","sync-library":"library","install-library":"library","start-registry":"localRegistry","reset-registry":"localRegistry","smoke-registry":"localRegistry","version":"package","create-package":"package","remove-package":"package","sync-package":"package","build-package":"package","verify-dist-package":"package","verify-akan-publish-packages":"package","create-module":"module","remove-module":"module","create-service":"module","create-view":"module","create-unit":"module","create-template":"module","create-crud-page":"page","context":"context","doctor":"context","mcp-install":"context","mcp":"context","mcp-call":"context","login":"cloud","logout":"cloud","set-llm":"cloud","reset-llm":"cloud","ask":"cloud","deploy-akan":"cloud","update":"cloud","download-env":"cloud","upload-env":"cloud","guideline":"guideline","generate-instruction":"guideline","update-instruction":"guideline","generate-document":"guideline","reapply-instruction":"guideline","create-scalar":"scalar","remove-scalar":"scalar","create-ui":"primitive","add-field":"primitive","add-enum-field":"primitive","quality":"quality","repair":"repair","workflow":"workflow"}}
@@ -0,0 +1,82 @@
1
+ // @bun
2
+ import {
3
+ ContextScript
4
+ } from "./index-qhtr07v8.js";
5
+ import"./index-45aj5ry0.js";
6
+ import"./index-y3hdhy4p.js";
7
+ import"./index-73pr2cmy.js";
8
+ import"./index-85msc0wg.js";
9
+ import"./index-1xdrsbry.js";
10
+ import"./index-8rc0bm04.js";
11
+ import"./index-76rn3g2c.js";
12
+ import"./index-8pkbzj26.js";
13
+ import"./index-swf4bmbg.js";
14
+ import"./index-ss469dec.js";
15
+ import"./index-qaq13qk3.js";
16
+ import"./index-h6ca6qg0.js";
17
+ import"./index-5vvwc0cz.js";
18
+ import {
19
+ Workspace,
20
+ command
21
+ } from "./index-hdqztm58.js";
22
+ import"./index-a6sbyy0b.js";
23
+ import"./index-61keag0s.js";
24
+ import"./index-6pz1j0zj.js";
25
+ import"./index-r24hmh0q.js";
26
+
27
+ // pkgs/@akanjs/cli/context/context.command.ts
28
+ class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
29
+ context: target({ desc: "Print agent-readable Akan workspace context" }).option("format", String, {
30
+ desc: "output format",
31
+ default: "markdown",
32
+ enum: ["markdown", "json"]
33
+ }).option("app", String, { desc: "app name to include", nullable: true }).option("module", String, { desc: "module name to include with abstract content", nullable: true }).with(Workspace).exec(async function(format, app, module, workspace) {
34
+ await this.contextScript.context(workspace, { format, app, module });
35
+ }),
36
+ doctor: target({ desc: "Report Akan workspace convention diagnostics" }).option("format", String, {
37
+ desc: "output format",
38
+ default: "text",
39
+ enum: ["text", "json"]
40
+ }).option("strict", Boolean, { desc: "treat recommended conventions as errors", default: false }).option("ios", Boolean, {
41
+ desc: "report iOS/mobile config diagnostics (placeholder bundle ids, etc.)",
42
+ default: false
43
+ }).with(Workspace).exec(async function(format, strict, ios, workspace) {
44
+ await this.contextScript.doctor(workspace, { format, strict, ios });
45
+ }),
46
+ mcpInstall: target({ desc: "Install the Akan MCP server config for Cursor, Claude Code, and Codex" }).arg("target", String, { desc: "cursor, claude, codex, or all", nullable: true }).option("force", Boolean, { desc: "overwrite an existing Akan MCP server entry", default: false }).option("mode", String, {
47
+ desc: "MCP permission mode",
48
+ default: "apply",
49
+ enum: ["readonly", "plan", "apply"]
50
+ }).with(Workspace).exec(async function(targetName, force, mode, workspace) {
51
+ await this.contextScript.mcpInstall(workspace, targetName, {
52
+ force,
53
+ mode
54
+ });
55
+ }),
56
+ mcp: target({ desc: "Start the Akan MCP server over stdio", stdio: true }).option("mode", String, {
57
+ desc: "MCP permission mode",
58
+ default: "readonly",
59
+ enum: ["readonly", "plan", "apply"]
60
+ }).with(Workspace).exec(async function(mode, workspace) {
61
+ await this.contextScript.mcp(workspace, { mode });
62
+ }),
63
+ mcpCall: target({ desc: "Call one Akan MCP tool for debugging without stdio JSON-RPC" }).arg("tool", String, { desc: "MCP tool name" }).option("mode", String, {
64
+ desc: "MCP permission mode",
65
+ default: "readonly",
66
+ enum: ["readonly", "plan", "apply"]
67
+ }).option("args", String, { desc: "JSON object to pass as MCP tool arguments", nullable: true }).option("format", String, {
68
+ desc: "output format",
69
+ default: "json",
70
+ enum: ["json"]
71
+ }).with(Workspace).exec(async function(tool, mode, args, format, workspace) {
72
+ await this.contextScript.mcpCall(workspace, tool, {
73
+ mode,
74
+ args,
75
+ format
76
+ });
77
+ })
78
+ })) {
79
+ }
80
+ export {
81
+ ContextCommand
82
+ };
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import {
3
+ TypeScriptDependencyScanner
4
+ } from "./index-x53a5nya.js";
5
+ import"./index-61keag0s.js";
6
+ import"./index-r24hmh0q.js";
7
+ export {
8
+ TypeScriptDependencyScanner
9
+ };