@akanjs/cli 3.0.0-alpha.2 → 3.0.0-alpha.21
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.
- package/.build-stamp +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/{abstractCompactor-e5yq60qz.js → abstractCompactor-20e0cwbs.js} +2 -2
- package/{agent.command-yv00p0s0.js → agent.command-g92sg0pw.js} +8 -7
- package/{application.command-0qsczf4k.js → application.command-8snsrzks.js} +6 -5
- package/{applicationBuildRunner-ct2pxyvw.js → applicationBuildRunner-7gnfz7ww.js} +6 -7
- package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-93nzdfsy.js} +1 -1
- package/buildBatch.proc.js +5 -4
- package/{capacitorApp-4r9sm3qg.js → capacitorApp-hyz5hypv.js} +29 -26
- package/{cloud.command-dxfv18sa.js → cloud.command-27tan2c5.js} +10 -9
- package/{context.command-8d9e3k6b.js → context.command-x0ms4783.js} +16 -15
- package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
- package/getDirname-ka11hm7e.js +8 -0
- package/{guideline.command-3jbkxzh6.js → guideline.command-1vadc7m2.js} +7 -6
- package/guidelines/conventions/conventions.generate.json +25 -0
- package/guidelines/conventions/conventions.instruction.md +909 -0
- package/guidelines/cssRule/cssRule.instruction.md +7 -0
- package/guidelines/framework/framework.instruction.md +1 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +972 -0
- package/incrementalBuilder.proc.js +4 -3
- package/index-1577bej2.js +7 -0
- package/{index-1pvex4az.js → index-1brb6fhj.js} +13 -13
- package/{index-2q1f5j9k.js → index-3taw6vhk.js} +3 -3
- package/{index-k95xkh4p.js → index-4zbcwnr4.js} +8 -4
- package/{index-a00jg8x8.js → index-68ynenz3.js} +49 -32
- package/{index-yzmhasdb.js → index-72jn9p18.js} +8 -8
- package/{index-8hsbnyes.js → index-91va923f.js} +5 -3
- package/{index-rzwcpcc3.js → index-cfzvtfwp.js} +1 -1
- package/{index-7c6k4yvg.js → index-cmffkxcx.js} +15 -7
- package/{index-ec09pws3.js → index-cxf04znn.js} +4 -4
- package/{index-nm6wghb6.js → index-dc8y2vae.js} +6 -6
- package/{index-bbkek1bp.js → index-f8qt4sdr.js} +1 -1
- package/{index-hgna5rjy.js → index-gn6jc5kp.js} +141 -65
- package/{index-t3723f99.js → index-hbm5htq0.js} +86 -17
- package/{index-pyt2b4nw.js → index-hg0qvhmx.js} +152 -241
- package/{index-tdbas9r0.js → index-j37qq1f2.js} +1 -1
- package/{index-mr5s7mqd.js → index-krmp6zdm.js} +3 -3
- package/{index-bekddz9q.js → index-prq4dmbf.js} +4 -4
- package/{index-rh16j3c7.js → index-qnv0aqmm.js} +12 -8
- package/{index-0cj2zxbm.js → index-sh01r3pm.js} +1 -1
- package/{index-zasydjxd.js → index-vbvnq3cr.js} +9 -11
- package/{index-ej426mcr.js → index-w4gzpx6w.js} +37 -6
- package/{index-e16gnn26.js → index-zyk0731f.js} +12 -12
- package/index.js +20 -19
- package/{library.command-ebdj1vnm.js → library.command-eszvmj60.js} +5 -4
- package/{localRegistry.command-gb178ne8.js → localRegistry.command-t4yksc4z.js} +9 -8
- package/{module.command-9c1bnsx4.js → module.command-7nezmr8d.js} +9 -8
- package/{package.command-t93p4jkj.js → package.command-vtyf9kgj.js} +5 -4
- package/package.json +3 -4
- package/{page.command-k3k0meh2.js → page.command-08kg25hh.js} +5 -4
- package/{primitive.command-de6nktdt.js → primitive.command-er9zkjhd.js} +10 -9
- package/{quality.command-z5kth2wa.js → quality.command-ntyzf8vz.js} +11 -41
- package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
- package/{repair.command-ehf2g112.js → repair.command-sfn4msje.js} +7 -6
- package/{routeSourceValidator-cncd92fv.js → routeSourceValidator-7fycdqyv.js} +3 -39
- package/{scalar.command-7a2jtv33.js → scalar.command-mxvqc069.js} +8 -7
- package/templates/app/page/styles.css.template +3 -3
- package/templates/appSample/srvkit/AuthGuard.ts +9 -5
- package/templates/appSample/srvkit/SessionInternalArg.ts +4 -3
- package/templates/crudPages/[__model__Id]/edit/page.tsx +1 -1
- package/templates/crudPages/new/page.tsx +1 -1
- package/templates/crudSinglePage/page.tsx +1 -1
- package/templates/env/_env.server.type.ts +7 -4
- package/templates/lib/db.ts +1 -1
- package/templates/lib/dict.ts +1 -1
- package/templates/lib/sig.ts +1 -1
- package/templates/lib/srv.ts +7 -3
- package/templates/lib/useClient.ts +9 -3
- package/templates/module/__Model__.Util.tsx +1 -1
- package/templates/module/__Model__.Zone.tsx +3 -5
- package/templates/workspaceRoot/AGENTS.md.template +0 -955
- package/templates/workspaceRoot/CLAUDE.md.template +19 -0
- package/templates/workspaceRoot/biome.json.template +4 -198
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +4 -1
- package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/{workflow.command-e0tt0vk2.js → workflow.command-y7vg1hx2.js} +15 -14
- package/{workspace.command-fpda0evj.js → workspace.command-bjf247fv.js} +69 -51
- package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
- package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -33
- package/templates/workspaceRoot/.cursor/rules/application-test-commands.mdc.template +0 -16
- package/templates/workspaceRoot/.cursor/rules/change-scope.mdc.template +0 -12
- package/templates/workspaceRoot/.cursor/rules/client-server-boundaries.mdc.template +0 -18
- package/templates/workspaceRoot/.cursor/rules/coding-comments.mdc.template +0 -25
- package/templates/workspaceRoot/.cursor/rules/coding-style.mdc.template +0 -44
- package/templates/workspaceRoot/.cursor/rules/domain-module-conventions.mdc.template +0 -17
- package/templates/workspaceRoot/.cursor/rules/format-lint.mdc.template +0 -12
- package/templates/workspaceRoot/.cursor/rules/lint-enforced-rules.mdc.template +0 -18
- package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -61
- package/templates/workspaceRoot/.cursor/rules/naming-conventions.mdc.template +0 -15
- package/templates/workspaceRoot/.cursor/rules/react-component-style.mdc.template +0 -21
- package/templates/workspaceRoot/.cursor/rules/repo-overview.mdc.template +0 -17
- package/templates/workspaceRoot/.cursor/rules/scalar-modeling.mdc.template +0 -58
- package/templates/workspaceRoot/.cursor/rules/secrets-and-env.mdc.template +0 -13
- package/templates/workspaceRoot/.cursor/rules/service-signal-conventions.mdc.template +0 -83
- package/templates/workspaceRoot/.cursor/rules/srvkit-adapters-and-guards.mdc.template +0 -50
- package/templates/workspaceRoot/.cursor/rules/ssr-first.mdc.template +0 -59
- package/templates/workspaceRoot/.cursor/rules/typescript-imports.mdc.template +0 -16
- /package/{index-r24hmh0q.js → index-yb2wsc7f.js} +0 -0
|
@@ -849,6 +849,7 @@ class ClientEntriesBundler {
|
|
|
849
849
|
#externalSubpaths;
|
|
850
850
|
#externalAliases;
|
|
851
851
|
#command;
|
|
852
|
+
#target;
|
|
852
853
|
#outputSubdir;
|
|
853
854
|
#reactFastRefresh;
|
|
854
855
|
#artifactDir;
|
|
@@ -870,6 +871,7 @@ class ClientEntriesBundler {
|
|
|
870
871
|
this.#externalSubpaths = options.externalSubpaths ?? [];
|
|
871
872
|
this.#externalAliases = options.externalAliases ?? {};
|
|
872
873
|
this.#command = options.command ?? "start";
|
|
874
|
+
this.#target = options.target ?? "browser";
|
|
873
875
|
this.#outputSubdir = options.outputSubdir ?? "client";
|
|
874
876
|
this.#reactFastRefresh = options.reactFastRefresh ?? false;
|
|
875
877
|
this.#artifactDir = `${this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath}/.akan/artifact`;
|
|
@@ -883,7 +885,7 @@ class ClientEntriesBundler {
|
|
|
883
885
|
entrypoints: this.#opaqueEntries.entries,
|
|
884
886
|
outdir: this.#outdir,
|
|
885
887
|
splitting: true,
|
|
886
|
-
target:
|
|
888
|
+
target: this.#target,
|
|
887
889
|
format: "esm",
|
|
888
890
|
naming: CLIENT_BUNDLE_NAMING,
|
|
889
891
|
metafile: true,
|
|
@@ -1117,7 +1119,8 @@ var VENDOR_SPECIFIERS = [
|
|
|
1117
1119
|
"akanjs/store",
|
|
1118
1120
|
"akanjs/base",
|
|
1119
1121
|
"akanjs/common",
|
|
1120
|
-
"akanjs/constant"
|
|
1122
|
+
"akanjs/constant",
|
|
1123
|
+
"akanjs/fetch"
|
|
1121
1124
|
];
|
|
1122
1125
|
|
|
1123
1126
|
// pkgs/@akanjs/devkit/frontendBuild/routeClientBuilder.ts
|
|
@@ -1143,16 +1146,17 @@ class RouteClientBuilder {
|
|
|
1143
1146
|
#knownEntries;
|
|
1144
1147
|
#command;
|
|
1145
1148
|
#discovery;
|
|
1149
|
+
#entries;
|
|
1146
1150
|
constructor(options) {
|
|
1147
1151
|
this.#app = options.app;
|
|
1148
1152
|
this.#seeds = options.seeds;
|
|
1149
1153
|
this.#knownEntries = options.knownEntries ?? new Set;
|
|
1150
1154
|
this.#command = options.command ?? "start";
|
|
1151
1155
|
this.#discovery = options.discovery;
|
|
1156
|
+
this.#entries = options.entries;
|
|
1152
1157
|
}
|
|
1153
1158
|
async build() {
|
|
1154
|
-
const
|
|
1155
|
-
const discovered = await discovery.discover(this.#seeds);
|
|
1159
|
+
const discovered = this.#entries ?? await (this.#discovery ?? await GraphClientEntryDiscovery.create(this.#app)).discover(this.#seeds);
|
|
1156
1160
|
const entries = discovered.filter((e) => !this.#knownEntries.has(e));
|
|
1157
1161
|
if (entries.length === 0)
|
|
1158
1162
|
return this.#emptyResult(discovered);
|
|
@@ -1225,12 +1229,11 @@ class RouteClientBuilder {
|
|
|
1225
1229
|
}).bundle();
|
|
1226
1230
|
}
|
|
1227
1231
|
async#buildSsrBundle(bootstrapEntries) {
|
|
1228
|
-
const externalOptions = RouteClientBuilder.resolveSsrClientExternalOptions(this.#command);
|
|
1229
1232
|
return new ClientEntriesBundler({
|
|
1230
1233
|
app: this.#app,
|
|
1231
1234
|
entries: bootstrapEntries.buildEntries,
|
|
1232
1235
|
plugins: [await createBarrelImportsPlugin(this.#app)],
|
|
1233
|
-
...
|
|
1236
|
+
...RouteClientBuilder.resolveSsrClientBundleOptions(this.#command),
|
|
1234
1237
|
outputSubdir: "client-ssr",
|
|
1235
1238
|
command: this.#command
|
|
1236
1239
|
}).bundle();
|
|
@@ -1292,15 +1295,16 @@ ${defaultNames.map((name) => `export default ${name};`).join(`
|
|
|
1292
1295
|
const serverEntry = RouteClientBuilder.resolveAkanServerEntry();
|
|
1293
1296
|
return { [Bun.resolveSync("akanjs/fetch", serverEntry)]: "akanjs/fetch" };
|
|
1294
1297
|
}
|
|
1295
|
-
static
|
|
1298
|
+
static resolveSsrClientBundleOptions(command) {
|
|
1296
1299
|
if (command === "start") {
|
|
1297
1300
|
return {
|
|
1301
|
+
target: "bun",
|
|
1298
1302
|
external: SSR_CLIENT_EXTERNALS,
|
|
1299
1303
|
externalSubpaths: ["akanjs/fetch"],
|
|
1300
1304
|
externalAliases: RouteClientBuilder.resolveSsrClientRuntimeAliases()
|
|
1301
1305
|
};
|
|
1302
1306
|
}
|
|
1303
|
-
return { external: SSR_CLIENT_ALIAS_EXTERNALS };
|
|
1307
|
+
return { target: "bun", external: SSR_CLIENT_ALIAS_EXTERNALS };
|
|
1304
1308
|
}
|
|
1305
1309
|
static resolveAkanServerEntry() {
|
|
1306
1310
|
try {
|
|
@@ -240,7 +240,7 @@ import { ChatOpenAI } from "@langchain/openai";
|
|
|
240
240
|
import { Logger } from "akanjs/common";
|
|
241
241
|
import chalk from "chalk";
|
|
242
242
|
var MAX_ASK_TRY = 300;
|
|
243
|
-
var deepSeekLlmModels = ["deepseek-
|
|
243
|
+
var deepSeekLlmModels = ["deepseek-v4-flash", "deepseek-v4-pro"];
|
|
244
244
|
var openAiLlmModels = ["gpt-5.5"];
|
|
245
245
|
var supportedLlmModels = [...deepSeekLlmModels, ...openAiLlmModels];
|
|
246
246
|
var isOpenAiLlmModel = (model) => openAiLlmModels.includes(model);
|
|
@@ -4,24 +4,17 @@ import {
|
|
|
4
4
|
CloudApi,
|
|
5
5
|
GlobalConfig,
|
|
6
6
|
getDefaultHostConfig
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-sh01r3pm.js";
|
|
8
8
|
import {
|
|
9
9
|
openBrowser
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-zyk0731f.js";
|
|
11
11
|
import {
|
|
12
12
|
runner
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-91va923f.js";
|
|
14
14
|
import {
|
|
15
15
|
AppExecutor,
|
|
16
16
|
WorkspaceExecutor
|
|
17
|
-
} from "./index-
|
|
18
|
-
|
|
19
|
-
// pkgs/@akanjs/cli/cloud/cloud.runner.ts
|
|
20
|
-
import path from "path";
|
|
21
|
-
import { confirm, input, select } from "@inquirer/prompts";
|
|
22
|
-
import { Logger, sleep } from "akanjs/common";
|
|
23
|
-
import chalk from "chalk";
|
|
24
|
-
import * as QRcode from "qrcode";
|
|
17
|
+
} from "./index-gn6jc5kp.js";
|
|
25
18
|
|
|
26
19
|
// pkgs/@akanjs/cli/npmRegistry.ts
|
|
27
20
|
var defaultNpmRegistry = "https://registry.npmjs.org";
|
|
@@ -40,6 +33,11 @@ async function getLatestPackageVersion(packageName, tag = "latest", registryUrl)
|
|
|
40
33
|
}
|
|
41
34
|
|
|
42
35
|
// pkgs/@akanjs/cli/cloud/cloud.runner.ts
|
|
36
|
+
import path from "path";
|
|
37
|
+
import { confirm, input, select } from "@inquirer/prompts";
|
|
38
|
+
import { Logger, sleep } from "akanjs/common";
|
|
39
|
+
import chalk from "chalk";
|
|
40
|
+
import * as QRcode from "qrcode";
|
|
43
41
|
var addRemoteEnvServerValue = "__addRemoteEnvServer";
|
|
44
42
|
var removeRemoteEnvServerValue = "__removeRemoteEnvServer";
|
|
45
43
|
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AkanContextAnalyzer
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-68ynenz3.js";
|
|
5
5
|
import {
|
|
6
6
|
Prompter
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-j37qq1f2.js";
|
|
8
8
|
import {
|
|
9
9
|
runner,
|
|
10
10
|
script
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-91va923f.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT_BLOCK_END,
|
|
14
14
|
AGENT_BLOCK_START,
|
|
15
15
|
AppExecutor,
|
|
16
|
+
CLAUDE_COMMENT_RULE,
|
|
16
17
|
LibExecutor,
|
|
18
|
+
readDevkitVersion,
|
|
17
19
|
renderRecipeEntries,
|
|
20
|
+
stampBlockVersion,
|
|
18
21
|
upsertAgentBlock
|
|
19
|
-
} from "./index-
|
|
22
|
+
} from "./index-gn6jc5kp.js";
|
|
20
23
|
import {
|
|
21
24
|
collectRecipeSources,
|
|
22
25
|
scanRecipes
|
|
@@ -103,19 +106,33 @@ ${scopeIndexPointer}
|
|
|
103
106
|
|
|
104
107
|
`;
|
|
105
108
|
};
|
|
109
|
+
var renderGuides = async (context) => {
|
|
110
|
+
const conventions = (await Prompter.getInstruction("conventions")).trim();
|
|
111
|
+
if (context.pkgs.some((pkg) => pkg.name === "akanjs"))
|
|
112
|
+
return conventions;
|
|
113
|
+
const onboarding = (await Prompter.getInstruction("workspaceOnboarding")).trim();
|
|
114
|
+
const appName = context.apps[0]?.name ?? "app";
|
|
115
|
+
return `${conventions}
|
|
116
|
+
|
|
117
|
+
${onboarding.replaceAll("<%= appName %>", appName)}`;
|
|
118
|
+
};
|
|
106
119
|
var renderManagedBlock = async (workspace) => {
|
|
107
120
|
const context = await AkanContextAnalyzer.analyze(workspace);
|
|
108
121
|
const frameworkGuide = await Prompter.getInstruction("framework");
|
|
109
122
|
const appNames = context.apps.map((app) => app.name);
|
|
110
123
|
const sampleCleanup = await renderSampleCleanup(workspace, appNames);
|
|
111
124
|
const recipeIndex = await renderRecipeIndex(workspace);
|
|
112
|
-
|
|
125
|
+
const guides = await renderGuides(context);
|
|
126
|
+
const version = await readDevkitVersion();
|
|
127
|
+
const block = `## Workspace
|
|
113
128
|
|
|
114
129
|
- Repo: ${context.repoName}
|
|
115
130
|
- Apps: ${context.apps.map((app) => app.name).join(", ") || "none"}
|
|
116
131
|
- Libraries: ${context.libs.map((lib) => lib.name).join(", ") || "none"}
|
|
117
132
|
- Packages: ${context.pkgs.map((pkg) => pkg.name).join(", ") || "none"}
|
|
118
133
|
|
|
134
|
+
${guides}
|
|
135
|
+
|
|
119
136
|
${sampleCleanup}## Akan Module Abstracts
|
|
120
137
|
|
|
121
138
|
- Before changing a domain, service, or scalar module, read its \`*.abstract.md\` file first.
|
|
@@ -148,7 +165,19 @@ ${context.validationCommands.map((command) => `- \`${command}\``).join(`
|
|
|
148
165
|
|
|
149
166
|
## Framework Guide
|
|
150
167
|
|
|
151
|
-
${frameworkGuide.trim()}
|
|
168
|
+
${frameworkGuide.trim()}
|
|
169
|
+
|
|
170
|
+
## Before You Finish
|
|
171
|
+
|
|
172
|
+
1. \`bun run akan lint <appName>\` \u2014 Tailwind class order, \`Err\`, \`console\`, \`#private\` scope, unused imports.
|
|
173
|
+
2. \`bun run akan typecheck <appName>\` \u2014 server/client boundary violations.
|
|
174
|
+
3. \`bun run akan sync <appName>\` if you added, renamed, or deleted any file.
|
|
175
|
+
4. Did you write or change a \`.tsx\` file? \`bun run akan quality ssr\` \u2014 did the server share hold, and did you add
|
|
176
|
+
a \`"use client"\` you cannot justify?
|
|
177
|
+
5. Re-read the file you wrote against its section above.
|
|
178
|
+
6. Did you add a comment? Delete it unless it documents an external constraint or a security decision.
|
|
179
|
+
7. Did behavior or an invariant change? Update the module's \`*.abstract.md\`.`;
|
|
180
|
+
return version ? stampBlockVersion(block, version) : block;
|
|
152
181
|
};
|
|
153
182
|
var renderAgentsMd = async (workspace, existing) => {
|
|
154
183
|
const block = await renderManagedBlock(workspace);
|
|
@@ -171,6 +200,8 @@ var renderClaudeMd = async (workspace) => {
|
|
|
171
200
|
return `# ${context.repoName} \u2014 Claude Code Guide
|
|
172
201
|
|
|
173
202
|
@AGENTS.md
|
|
203
|
+
|
|
204
|
+
${CLAUDE_COMMENT_RULE}
|
|
174
205
|
`;
|
|
175
206
|
};
|
|
176
207
|
var renderCursorRule = () => `---
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
LibraryScript
|
|
4
|
+
} from "./index-cmffkxcx.js";
|
|
2
5
|
import {
|
|
3
6
|
resolveMobileTargets
|
|
4
7
|
} from "./index-76rn3g2c.js";
|
|
5
|
-
import {
|
|
6
|
-
LibraryScript
|
|
7
|
-
} from "./index-7c6k4yvg.js";
|
|
8
8
|
import {
|
|
9
9
|
runner,
|
|
10
10
|
script
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-91va923f.js";
|
|
12
12
|
import {
|
|
13
13
|
HmrWatcher,
|
|
14
14
|
WatchRootResolver
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
LibExecutor,
|
|
19
19
|
PkgExecutor,
|
|
20
20
|
WorkspaceExecutor
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-gn6jc5kp.js";
|
|
22
22
|
import {
|
|
23
23
|
__require
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-yb2wsc7f.js";
|
|
25
25
|
|
|
26
26
|
// pkgs/@akanjs/devkit/applicationBuildReporter.ts
|
|
27
27
|
import { Logger } from "akanjs/common";
|
|
@@ -1898,10 +1898,10 @@ function openBrowser(url) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
|
|
1900
1900
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
1901
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
1902
|
-
var loadReleasePackager = async () => (await import("./applicationReleasePackager-
|
|
1903
|
-
var loadCapacitorApp = async () => (await import("./capacitorApp-
|
|
1904
|
-
var loadAbstractCompactor = async () => (await import("./abstractCompactor-
|
|
1901
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-7gnfz7ww.js")).ApplicationBuildRunner;
|
|
1902
|
+
var loadReleasePackager = async () => (await import("./applicationReleasePackager-93nzdfsy.js")).ApplicationReleasePackager;
|
|
1903
|
+
var loadCapacitorApp = async () => (await import("./capacitorApp-hyz5hypv.js")).CapacitorApp;
|
|
1904
|
+
var loadAbstractCompactor = async () => (await import("./abstractCompactor-20e0cwbs.js")).AbstractCompactor;
|
|
1905
1905
|
var loadPrompts = async () => await import("@inquirer/prompts");
|
|
1906
1906
|
|
|
1907
1907
|
class ApplicationRunner extends runner("application") {
|
|
@@ -2528,7 +2528,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
2528
2528
|
let stopping = false;
|
|
2529
2529
|
process.on("SIGINT", () => {
|
|
2530
2530
|
if (stopping) {
|
|
2531
|
-
Logger5.rawLog("Abandoning the local database teardown; containers are left running.", undefined, "
|
|
2531
|
+
Logger5.rawLog("Abandoning the local database teardown; containers are left running.", undefined, "error");
|
|
2532
2532
|
process.exit(130);
|
|
2533
2533
|
}
|
|
2534
2534
|
stopping = true;
|
|
@@ -2542,7 +2542,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
2542
2542
|
}), timeout]);
|
|
2543
2543
|
if (result !== "timeout")
|
|
2544
2544
|
return;
|
|
2545
|
-
Logger5.rawLog(`Local database did not stop within ${ApplicationScript.dbShutdownTimeoutMs}ms; run \`akan dbdown\` once Docker responds.`, undefined, "
|
|
2545
|
+
Logger5.rawLog(`Local database did not stop within ${ApplicationScript.dbShutdownTimeoutMs}ms; run \`akan dbdown\` once Docker responds.`, undefined, "error");
|
|
2546
2546
|
}
|
|
2547
2547
|
async testSys(sys) {
|
|
2548
2548
|
if (sys.type === "app")
|
package/index.js
CHANGED
|
@@ -4,35 +4,36 @@ import {
|
|
|
4
4
|
getTargetCommandNames,
|
|
5
5
|
getTargetMetas,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-91va923f.js";
|
|
8
|
+
import"./index-gn6jc5kp.js";
|
|
9
9
|
import"./index-mxvakhsm.js";
|
|
10
|
+
import"./index-1577bej2.js";
|
|
10
11
|
import"./index-67546d0j.js";
|
|
11
12
|
import {
|
|
12
13
|
__require
|
|
13
|
-
} from "./index-
|
|
14
|
+
} from "./index-yb2wsc7f.js";
|
|
14
15
|
|
|
15
16
|
// pkgs/@akanjs/cli/commandManifest.ts
|
|
16
17
|
import path from "path";
|
|
17
18
|
|
|
18
19
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
19
20
|
var commandModules = {
|
|
20
|
-
workspace: async () => (await import("./workspace.command-
|
|
21
|
-
agent: async () => (await import("./agent.command-
|
|
22
|
-
application: async () => (await import("./application.command-
|
|
23
|
-
library: async () => (await import("./library.command-
|
|
24
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
25
|
-
package: async () => (await import("./package.command-
|
|
26
|
-
module: async () => (await import("./module.command-
|
|
27
|
-
page: async () => (await import("./page.command-
|
|
28
|
-
context: async () => (await import("./context.command-
|
|
29
|
-
cloud: async () => (await import("./cloud.command-
|
|
30
|
-
guideline: async () => (await import("./guideline.command-
|
|
31
|
-
scalar: async () => (await import("./scalar.command-
|
|
32
|
-
primitive: async () => (await import("./primitive.command-
|
|
33
|
-
quality: async () => (await import("./quality.command-
|
|
34
|
-
repair: async () => (await import("./repair.command-
|
|
35
|
-
workflow: async () => (await import("./workflow.command-
|
|
21
|
+
workspace: async () => (await import("./workspace.command-bjf247fv.js")).WorkspaceCommand,
|
|
22
|
+
agent: async () => (await import("./agent.command-g92sg0pw.js")).AgentCommand,
|
|
23
|
+
application: async () => (await import("./application.command-8snsrzks.js")).ApplicationCommand,
|
|
24
|
+
library: async () => (await import("./library.command-eszvmj60.js")).LibraryCommand,
|
|
25
|
+
localRegistry: async () => (await import("./localRegistry.command-t4yksc4z.js")).LocalRegistryCommand,
|
|
26
|
+
package: async () => (await import("./package.command-vtyf9kgj.js")).PackageCommand,
|
|
27
|
+
module: async () => (await import("./module.command-7nezmr8d.js")).ModuleCommand,
|
|
28
|
+
page: async () => (await import("./page.command-08kg25hh.js")).PageCommand,
|
|
29
|
+
context: async () => (await import("./context.command-x0ms4783.js")).ContextCommand,
|
|
30
|
+
cloud: async () => (await import("./cloud.command-27tan2c5.js")).CloudCommand,
|
|
31
|
+
guideline: async () => (await import("./guideline.command-1vadc7m2.js")).GuidelineCommand,
|
|
32
|
+
scalar: async () => (await import("./scalar.command-mxvqc069.js")).ScalarCommand,
|
|
33
|
+
primitive: async () => (await import("./primitive.command-er9zkjhd.js")).PrimitiveCommand,
|
|
34
|
+
quality: async () => (await import("./quality.command-ntyzf8vz.js")).QualityCommand,
|
|
35
|
+
repair: async () => (await import("./repair.command-sfn4msje.js")).RepairCommand,
|
|
36
|
+
workflow: async () => (await import("./workflow.command-y7vg1hx2.js")).WorkflowCommand
|
|
36
37
|
};
|
|
37
38
|
var commandModuleIds = Object.keys(commandModules);
|
|
38
39
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
LibraryScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-cmffkxcx.js";
|
|
5
5
|
import {
|
|
6
6
|
Lib,
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-91va923f.js";
|
|
10
|
+
import"./index-gn6jc5kp.js";
|
|
11
11
|
import"./index-mxvakhsm.js";
|
|
12
|
+
import"./index-1577bej2.js";
|
|
12
13
|
import"./index-67546d0j.js";
|
|
13
|
-
import"./index-
|
|
14
|
+
import"./index-yb2wsc7f.js";
|
|
14
15
|
|
|
15
16
|
// pkgs/@akanjs/cli/library/library.command.ts
|
|
16
17
|
class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
|
|
@@ -2,31 +2,32 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CloudRunner,
|
|
4
4
|
getNpmRegistryUrl
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-vbvnq3cr.js";
|
|
6
6
|
import {
|
|
7
7
|
PackageScript
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
} from "./index-4zbcwnr4.js";
|
|
9
|
+
import"./index-sh01r3pm.js";
|
|
10
10
|
import {
|
|
11
11
|
ApplicationScript
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-zyk0731f.js";
|
|
13
|
+
import"./index-cmffkxcx.js";
|
|
13
14
|
import"./index-76rn3g2c.js";
|
|
14
|
-
import"./index-7c6k4yvg.js";
|
|
15
15
|
import {
|
|
16
16
|
Workspace,
|
|
17
17
|
command,
|
|
18
18
|
runner,
|
|
19
19
|
script
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-91va923f.js";
|
|
21
21
|
import"./index-fgc8r6dj.js";
|
|
22
22
|
import"./index-bjpxzr6s.js";
|
|
23
23
|
import {
|
|
24
24
|
PkgExecutor
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-gn6jc5kp.js";
|
|
26
26
|
import"./index-mxvakhsm.js";
|
|
27
|
+
import"./index-1577bej2.js";
|
|
27
28
|
import"./index-46tjzh6s.js";
|
|
28
29
|
import"./index-67546d0j.js";
|
|
29
|
-
import"./index-
|
|
30
|
+
import"./index-yb2wsc7f.js";
|
|
30
31
|
|
|
31
32
|
// pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
|
|
32
33
|
import { mkdir, rm } from "fs/promises";
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ModuleScript
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-bbkek1bp.js";
|
|
4
|
+
} from "./index-72jn9p18.js";
|
|
6
5
|
import"./index-ss469dec.js";
|
|
7
|
-
import"./index-
|
|
6
|
+
import"./index-f8qt4sdr.js";
|
|
7
|
+
import"./index-sh01r3pm.js";
|
|
8
8
|
import {
|
|
9
9
|
renderPrimitiveReport
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-cfzvtfwp.js";
|
|
11
|
+
import"./index-j37qq1f2.js";
|
|
12
12
|
import {
|
|
13
13
|
Module,
|
|
14
14
|
Sys,
|
|
15
15
|
command
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
16
|
+
} from "./index-91va923f.js";
|
|
17
|
+
import"./index-gn6jc5kp.js";
|
|
18
18
|
import"./index-mxvakhsm.js";
|
|
19
|
+
import"./index-1577bej2.js";
|
|
19
20
|
import"./index-67546d0j.js";
|
|
20
|
-
import"./index-
|
|
21
|
+
import"./index-yb2wsc7f.js";
|
|
21
22
|
|
|
22
23
|
// pkgs/@akanjs/cli/module/module.command.ts
|
|
23
24
|
import { Logger, lowerlize } from "akanjs/common";
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
PackageScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-4zbcwnr4.js";
|
|
5
5
|
import {
|
|
6
6
|
Pkg,
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-91va923f.js";
|
|
10
|
+
import"./index-gn6jc5kp.js";
|
|
11
11
|
import"./index-mxvakhsm.js";
|
|
12
|
+
import"./index-1577bej2.js";
|
|
12
13
|
import"./index-46tjzh6s.js";
|
|
13
14
|
import"./index-67546d0j.js";
|
|
14
|
-
import"./index-
|
|
15
|
+
import"./index-yb2wsc7f.js";
|
|
15
16
|
|
|
16
17
|
// pkgs/@akanjs/cli/package/package.command.ts
|
|
17
18
|
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.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.21",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"directory": "pkgs/@akanjs/cli"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
|
-
"bun": ">=1.
|
|
17
|
+
"bun": ">=1.4.0"
|
|
18
18
|
},
|
|
19
19
|
"bin": {
|
|
20
20
|
"akan": "./index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@langchain/openai": "^1.4.6",
|
|
35
35
|
"@tailwindcss/node": "^4.3.0",
|
|
36
36
|
"@trapezedev/project": "^7.1.4",
|
|
37
|
-
"akanjs": "3.0.0-alpha.
|
|
37
|
+
"akanjs": "3.0.0-alpha.21",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
39
|
"commander": "^14.0.3",
|
|
40
40
|
"dayjs": "^1.11.20",
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"fonteditor-core": "^2.6.3",
|
|
43
43
|
"ignore": "^7.0.5",
|
|
44
44
|
"ink": "^6.8.0",
|
|
45
|
-
"js-yaml": "^4.1.1",
|
|
46
45
|
"ora": "^9.4.0",
|
|
47
46
|
"qrcode": "^1.5.4",
|
|
48
47
|
"react": "19.2.7",
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
PageScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-f8qt4sdr.js";
|
|
5
5
|
import {
|
|
6
6
|
App,
|
|
7
7
|
Module,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-91va923f.js";
|
|
10
|
+
import"./index-gn6jc5kp.js";
|
|
11
11
|
import"./index-mxvakhsm.js";
|
|
12
|
+
import"./index-1577bej2.js";
|
|
12
13
|
import"./index-67546d0j.js";
|
|
13
|
-
import"./index-
|
|
14
|
+
import"./index-yb2wsc7f.js";
|
|
14
15
|
|
|
15
16
|
// pkgs/@akanjs/cli/page/page.command.ts
|
|
16
17
|
class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
PrimitiveScript
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-bbkek1bp.js";
|
|
4
|
+
} from "./index-prq4dmbf.js";
|
|
5
|
+
import"./index-72jn9p18.js";
|
|
7
6
|
import"./index-ss469dec.js";
|
|
8
|
-
import"./index-
|
|
7
|
+
import"./index-f8qt4sdr.js";
|
|
8
|
+
import"./index-sh01r3pm.js";
|
|
9
9
|
import {
|
|
10
10
|
renderPrimitiveReport
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
} from "./index-cfzvtfwp.js";
|
|
12
|
+
import"./index-j37qq1f2.js";
|
|
13
13
|
import {
|
|
14
14
|
Workspace,
|
|
15
15
|
command
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
16
|
+
} from "./index-91va923f.js";
|
|
17
|
+
import"./index-gn6jc5kp.js";
|
|
18
18
|
import"./index-mxvakhsm.js";
|
|
19
|
+
import"./index-1577bej2.js";
|
|
19
20
|
import"./index-67546d0j.js";
|
|
20
|
-
import"./index-
|
|
21
|
+
import"./index-yb2wsc7f.js";
|
|
21
22
|
|
|
22
23
|
// pkgs/@akanjs/cli/primitive/primitive.command.ts
|
|
23
24
|
import { Logger } from "akanjs/common";
|
|
@@ -7,16 +7,21 @@ import {
|
|
|
7
7
|
command,
|
|
8
8
|
runner,
|
|
9
9
|
script
|
|
10
|
-
} from "./index-
|
|
11
|
-
import
|
|
10
|
+
} from "./index-91va923f.js";
|
|
11
|
+
import {
|
|
12
|
+
appRootAllowedFiles,
|
|
13
|
+
libFacetRootAllowedFiles
|
|
14
|
+
} from "./index-gn6jc5kp.js";
|
|
12
15
|
import"./index-mxvakhsm.js";
|
|
16
|
+
import"./index-1577bej2.js";
|
|
13
17
|
import"./index-67546d0j.js";
|
|
14
|
-
import"./index-
|
|
18
|
+
import"./index-yb2wsc7f.js";
|
|
15
19
|
|
|
16
20
|
// pkgs/@akanjs/devkit/qualityScanner.ts
|
|
17
21
|
import { createHash } from "crypto";
|
|
18
22
|
import { readdir, readFile, stat } from "fs/promises";
|
|
19
23
|
import path from "path";
|
|
24
|
+
import { RESERVED_ROUTE_CONFIG_EXPORTS } from "akanjs/common";
|
|
20
25
|
import ignore from "ignore";
|
|
21
26
|
import ts2 from "typescript";
|
|
22
27
|
|
|
@@ -404,27 +409,6 @@ var SUGGESTED_RULES = [
|
|
|
404
409
|
"Move shared app utilities to apps/*/common instead of creating apps/*/base.",
|
|
405
410
|
"Avoid large mixed-purpose class files; class export files should import helpers from neighboring utility files instead of declaring them inline."
|
|
406
411
|
];
|
|
407
|
-
var APP_ROOT_FILES = new Set([
|
|
408
|
-
"akan.app.json",
|
|
409
|
-
"akan.config.ts",
|
|
410
|
-
"capacitor.config.ts",
|
|
411
|
-
"client.ts",
|
|
412
|
-
"main.ts",
|
|
413
|
-
"package.json",
|
|
414
|
-
"server.ts",
|
|
415
|
-
"tsconfig.json"
|
|
416
|
-
]);
|
|
417
|
-
var LIB_ROOT_FILES = new Set([
|
|
418
|
-
"cnst.ts",
|
|
419
|
-
"db.ts",
|
|
420
|
-
"dict.ts",
|
|
421
|
-
"option.ts",
|
|
422
|
-
"sig.ts",
|
|
423
|
-
"srv.ts",
|
|
424
|
-
"st.ts",
|
|
425
|
-
"useClient.ts",
|
|
426
|
-
"useServer.ts"
|
|
427
|
-
]);
|
|
428
412
|
var CONVENTION_SUFFIXES = [
|
|
429
413
|
".constant.ts",
|
|
430
414
|
".dictionary.ts",
|
|
@@ -433,20 +417,6 @@ var CONVENTION_SUFFIXES = [
|
|
|
433
417
|
".signal.ts",
|
|
434
418
|
".store.ts"
|
|
435
419
|
];
|
|
436
|
-
var PAGE_RESERVED_EXPORTS = new Set([
|
|
437
|
-
"pageConfig",
|
|
438
|
-
"head",
|
|
439
|
-
"metadata",
|
|
440
|
-
"generateHead",
|
|
441
|
-
"generateMetadata",
|
|
442
|
-
"fonts",
|
|
443
|
-
"manifest",
|
|
444
|
-
"theme",
|
|
445
|
-
"reconnect",
|
|
446
|
-
"wsConnect",
|
|
447
|
-
"layoutStyle",
|
|
448
|
-
"gaTrackingId"
|
|
449
|
-
]);
|
|
450
420
|
var RULE_FIXES = {
|
|
451
421
|
"akan.global.duplicate-exported-function-name": "Rename one of the exports, or if they are the same thing, extract it into one shared module and import it in both places.",
|
|
452
422
|
"akan.global.duplicate-exported-function-body": "Extract the shared implementation into a single exported helper and import it, instead of copying the body.",
|
|
@@ -703,7 +673,7 @@ class AkanQualityScanner {
|
|
|
703
673
|
#scanLayoutQuality(sourceFile) {
|
|
704
674
|
const segments = sourceFile.file.split("/");
|
|
705
675
|
const warnings = [];
|
|
706
|
-
if (segments[0] === "apps" && segments.length === 3 && !
|
|
676
|
+
if (segments[0] === "apps" && segments.length === 3 && !appRootAllowedFiles.has(segments[2])) {
|
|
707
677
|
warnings.push({
|
|
708
678
|
rule: "akan.layout.app-root-file",
|
|
709
679
|
scope: "layout",
|
|
@@ -713,7 +683,7 @@ class AkanQualityScanner {
|
|
|
713
683
|
});
|
|
714
684
|
}
|
|
715
685
|
const libRootFile = getLibRootFile(sourceFile.file);
|
|
716
|
-
if (libRootFile && !
|
|
686
|
+
if (libRootFile && !libFacetRootAllowedFiles.has(libRootFile)) {
|
|
717
687
|
warnings.push({
|
|
718
688
|
rule: "akan.layout.lib-root-file",
|
|
719
689
|
scope: "layout",
|
|
@@ -929,7 +899,7 @@ function isRestrictedInternalKind(kind) {
|
|
|
929
899
|
function isAllowedComponentExport(declaration, isPage) {
|
|
930
900
|
if (isComponentValueKind(declaration.kind) && isPascalCaseName(declaration.name))
|
|
931
901
|
return true;
|
|
932
|
-
return isPage &&
|
|
902
|
+
return isPage && RESERVED_ROUTE_CONFIG_EXPORTS.has(declaration.name);
|
|
933
903
|
}
|
|
934
904
|
function isPascalCaseName(name) {
|
|
935
905
|
return /^[A-Z]/.test(name) && !/^[A-Z0-9_]+$/.test(name);
|