@akanjs/cli 2.4.2-rc.2 → 3.0.0-alpha.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.
- package/.build-stamp +1 -1
- package/abstractCompactor-rk6twzvj.js +103 -0
- package/{agent.command-ej4g9pbb.js → agent.command-jfz8yfwy.js} +8 -7
- package/{application.command-smn51a28.js → application.command-3smsv7mq.js} +15 -5
- package/{applicationBuildRunner-554a2vnk.js → applicationBuildRunner-aq7mb3z6.js} +2 -1
- package/buildBatch.proc.js +7 -6
- package/{capacitorApp-yg9b4ajz.js → capacitorApp-q3mpmkkz.js} +3 -3
- package/{cloud.command-2v7ga38h.js → cloud.command-rk4e9vrt.js} +10 -10
- package/commandManifest.json +1 -1
- package/{context.command-hhjyjtp7.js → context.command-ygzyb0xb.js} +16 -15
- package/{guideline.command-vj956kfr.js → guideline.command-1m1ctar3.js} +10 -10
- package/guidelines/componentRule/componentRule.instruction.md +2 -2
- package/guidelines/cssRule/cssRule.generate.json +1 -1
- package/guidelines/cssRule/cssRule.instruction.md +57 -34
- package/guidelines/framework/framework.instruction.md +1 -1
- package/guidelines/recipeRule/recipeRule.generate.json +31 -0
- package/guidelines/recipeRule/recipeRule.instruction.md +72 -0
- package/incrementalBuilder.proc.js +5 -5
- package/index-0wae5ebk.js +65 -0
- package/{index-v9jqrdd1.js → index-4yp06pn1.js} +100 -2
- package/{index-pfnh87f9.js → index-4zgs8g1w.js} +1 -1
- package/{index-7ppn9v4n.js → index-b978vs2e.js} +3 -3
- package/{index-s9s0n5fz.js → index-cn24dcqn.js} +2 -2
- package/{index-h971erkm.js → index-csqk9z5j.js} +3 -3
- package/{index-z36qzgzp.js → index-e3qskyt2.js} +3 -4
- package/{index-panyahn4.js → index-ev6rjw9n.js} +27 -13
- package/{index-majzj044.js → index-f4gqk0dd.js} +8 -8
- package/{index-z5v766nx.js → index-fmgbwsr5.js} +6 -6
- package/{index-y1e79mz3.js → index-h0bngh79.js} +13 -13
- package/{index-dgeaqwmw.js → index-hjzr8ja1.js} +1 -1
- package/{index-d0h48d2f.js → index-jk9q6pse.js} +1 -1
- package/{index-xwfg9bam.js → index-jtm86byd.js} +120 -4
- package/{index-j3j3qc9j.js → index-ktprgc5g.js} +4 -4
- package/{index-40w1kqp1.js → index-n0z3f2xg.js} +74 -24
- package/{index-7k9sj7j5.js → index-pyt2b4nw.js} +212 -0
- package/{index-acwxfncv.js → index-r4w8cry5.js} +4 -4
- package/{index-zfp1gz9f.js → index-sggm9qkv.js} +1 -1
- package/{index-04as43rp.js → index-vhv3xnjz.js} +16 -15
- package/index-xjd3rqzj.js +129 -0
- package/{index-xftstr5s.js → index-xwgm94zr.js} +1 -1
- package/index-xys926f2.js +136 -0
- package/index.js +19 -19
- package/{library.command-68ah07a3.js → library.command-pwfx8dx2.js} +4 -4
- package/{localRegistry.command-nmyc5vwv.js → localRegistry.command-bxhqmd1d.js} +11 -11
- package/{module.command-t68xhamx.js → module.command-0t3ewata.js} +8 -8
- package/{package.command-00ncttab.js → package.command-7hmkxvpa.js} +4 -4
- package/package.json +2 -3
- package/{page.command-1096s18n.js → page.command-st6r4s0q.js} +4 -4
- package/{primitive.command-02eqpx6t.js → primitive.command-1qkxpzsn.js} +9 -9
- package/{quality.command-vap6xegb.js → quality.command-hy5vt1bh.js} +31 -6
- package/recipeScanner-tghkzrrt.js +12 -0
- package/{repair.command-7dynpnf1.js → repair.command-nakkq2zp.js} +7 -6
- package/{scalar.command-3kxy3fkh.js → scalar.command-fjq272gs.js} +7 -7
- package/templates/app/page/_index.tsx +55 -52
- package/templates/app/page/styles.css.template +12 -71
- package/templates/appSample/lib/task/Task.Template.tsx +2 -2
- package/templates/appSample/lib/task/Task.Unit.tsx +11 -11
- package/templates/appSample/lib/task/Task.Util.tsx +27 -28
- package/templates/appSample/lib/task/Task.View.tsx +22 -19
- package/templates/appSample/lib/task/Task.Zone.tsx +3 -3
- package/templates/appSample/page/task/[taskId]/_index.tsx +3 -3
- package/templates/appSample/page/task/[taskId]/edit.tsx +5 -5
- package/templates/appSample/page/task/_index.tsx +4 -4
- package/templates/appSample/page/task/_layout.tsx +1 -1
- package/templates/appSample/page/task/new.tsx +5 -5
- package/templates/appSample/ui/GlobalLoading.tsx +4 -4
- package/templates/appSample/ui/QuantityControl.tsx +5 -4
- package/templates/crudPages/[__model__Id]/page.tsx +1 -1
- package/templates/crudPages/page.tsx +1 -1
- package/templates/crudSinglePage/page.tsx +1 -1
- package/templates/module/__Model__.Template.tsx +2 -1
- package/templates/module/__Model__.Unit.tsx +2 -1
- package/templates/module/__Model__.Util.tsx +2 -1
- package/templates/module/__Model__.View.tsx +4 -3
- package/templates/module/__Model__.Zone.tsx +2 -1
- package/templates/workspaceRoot/AGENTS.md.template +11 -13
- package/templates/workspaceRoot/biome.json.template +1 -1
- package/{workflow.command-yy0d9gk3.js → workflow.command-jswbgk90.js} +15 -14
- package/{workspace.command-hq1x5605.js → workspace.command-p9r9nckg.js} +89 -29
- package/{applicationReleasePackager-pjbxc793.js → applicationReleasePackager-yrrhbkv3.js} +3 -3
- package/{index-nsj2ftxj.js → index-3pgtw35d.js} +3 -3
|
@@ -1,61 +1,74 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ContextScript
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
4
|
+
} from "./index-h0bngh79.js";
|
|
5
|
+
import"./index-b978vs2e.js";
|
|
6
|
+
import"./index-csqk9z5j.js";
|
|
7
|
+
import"./index-r4w8cry5.js";
|
|
8
|
+
import"./index-vhv3xnjz.js";
|
|
9
|
+
import"./index-hjzr8ja1.js";
|
|
7
10
|
import {
|
|
8
11
|
CloudScript
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-z5v766nx.js";
|
|
11
|
-
import"./index-acwxfncv.js";
|
|
12
|
-
import"./index-04as43rp.js";
|
|
13
|
-
import"./index-dgeaqwmw.js";
|
|
14
|
-
import"./index-ss469dec.js";
|
|
15
|
-
import"./index-zfp1gz9f.js";
|
|
16
|
-
import {
|
|
17
|
-
AgentScript
|
|
18
|
-
} from "./index-40w1kqp1.js";
|
|
19
|
-
import"./index-v9jqrdd1.js";
|
|
20
|
-
import"./index-pfnh87f9.js";
|
|
21
|
-
import"./index-xftstr5s.js";
|
|
12
|
+
} from "./index-f4gqk0dd.js";
|
|
22
13
|
import {
|
|
23
14
|
getLatestPackageVersion,
|
|
24
15
|
getNpmRegistryUrl
|
|
25
|
-
} from "./index-
|
|
16
|
+
} from "./index-ktprgc5g.js";
|
|
17
|
+
import {
|
|
18
|
+
PackageScript
|
|
19
|
+
} from "./index-e3qskyt2.js";
|
|
20
|
+
import"./index-fmgbwsr5.js";
|
|
21
|
+
import"./index-ss469dec.js";
|
|
22
|
+
import"./index-sggm9qkv.js";
|
|
26
23
|
import {
|
|
27
24
|
GlobalConfig
|
|
28
|
-
} from "./index-
|
|
25
|
+
} from "./index-3pgtw35d.js";
|
|
26
|
+
import {
|
|
27
|
+
AgentScript
|
|
28
|
+
} from "./index-n0z3f2xg.js";
|
|
29
|
+
import"./index-4yp06pn1.js";
|
|
30
|
+
import"./index-4zgs8g1w.js";
|
|
31
|
+
import"./index-xwgm94zr.js";
|
|
29
32
|
import {
|
|
30
33
|
ApplicationScript
|
|
31
|
-
} from "./index-
|
|
34
|
+
} from "./index-ev6rjw9n.js";
|
|
32
35
|
import"./index-76rn3g2c.js";
|
|
33
36
|
import {
|
|
34
37
|
LibraryScript
|
|
35
|
-
} from "./index-
|
|
36
|
-
import {
|
|
37
|
-
PackageScript
|
|
38
|
-
} from "./index-z36qzgzp.js";
|
|
38
|
+
} from "./index-cn24dcqn.js";
|
|
39
39
|
import {
|
|
40
40
|
Exec,
|
|
41
41
|
Workspace,
|
|
42
42
|
command,
|
|
43
43
|
runner,
|
|
44
44
|
script
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-jk9q6pse.js";
|
|
46
46
|
import"./index-fgc8r6dj.js";
|
|
47
|
+
import {
|
|
48
|
+
ThemeValidator,
|
|
49
|
+
countBlocking,
|
|
50
|
+
formatStyleContract
|
|
51
|
+
} from "./index-xjd3rqzj.js";
|
|
52
|
+
import"./index-bjpxzr6s.js";
|
|
47
53
|
import {
|
|
48
54
|
AppExecutor,
|
|
49
55
|
LibExecutor,
|
|
50
56
|
PkgExecutor,
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
SysExecutor,
|
|
58
|
+
WorkspaceExecutor,
|
|
59
|
+
collectScopeRecipeSources,
|
|
60
|
+
extractAgentBlock,
|
|
61
|
+
renderScopeAgentBlock
|
|
62
|
+
} from "./index-jtm86byd.js";
|
|
63
|
+
import"./index-6pz1j0zj.js";
|
|
64
|
+
import {
|
|
65
|
+
collectRecipeSources,
|
|
66
|
+
scanRecipes
|
|
67
|
+
} from "./index-xys926f2.js";
|
|
53
68
|
import"./index-46tjzh6s.js";
|
|
54
69
|
import {
|
|
55
70
|
FileSys
|
|
56
71
|
} from "./index-67546d0j.js";
|
|
57
|
-
import"./index-bjpxzr6s.js";
|
|
58
|
-
import"./index-6pz1j0zj.js";
|
|
59
72
|
import"./index-r24hmh0q.js";
|
|
60
73
|
|
|
61
74
|
// pkgs/@akanjs/cli/workspace/workspace.script.ts
|
|
@@ -69,7 +82,6 @@ var defaultWorkspacePeerDependencies = new Set([
|
|
|
69
82
|
"@use-gesture/react",
|
|
70
83
|
"chance",
|
|
71
84
|
"croner",
|
|
72
|
-
"daisyui",
|
|
73
85
|
"react",
|
|
74
86
|
"react-dom",
|
|
75
87
|
"react-icons",
|
|
@@ -231,6 +243,54 @@ class WorkspaceRunner extends runner("workspace") {
|
|
|
231
243
|
"--no-errors-on-unmatched",
|
|
232
244
|
exec.cwdPath
|
|
233
245
|
]);
|
|
246
|
+
await this.#enforceStyleContract(exec);
|
|
247
|
+
await this.#enforceRecipeGate(exec);
|
|
248
|
+
await this.#enforceAgentsIndex(exec);
|
|
249
|
+
}
|
|
250
|
+
async#enforceAgentsIndex(exec) {
|
|
251
|
+
if (!(exec instanceof SysExecutor))
|
|
252
|
+
return;
|
|
253
|
+
const scope = { type: exec.type, name: exec.name };
|
|
254
|
+
const scanInfo = await exec.scan({ write: false });
|
|
255
|
+
const sources = await collectScopeRecipeSources(exec.workspace.workspaceRoot, scope, scanInfo.getScanResult().libDeps);
|
|
256
|
+
const expected = renderScopeAgentBlock(scope, scanRecipes(sources));
|
|
257
|
+
const existing = await exec.exists("AGENTS.md") ? await exec.readFile("AGENTS.md") : null;
|
|
258
|
+
const actual = existing ? extractAgentBlock(existing) : null;
|
|
259
|
+
if (actual === expected.trim())
|
|
260
|
+
return;
|
|
261
|
+
throw new Error(`[agentsIndex] ${scope.type}s/${scope.name}/AGENTS.md \uC758 recipe \uC0C9\uC778\uC774 \uC18C\uC2A4\uC640 \uB2E4\uB985\uB2C8\uB2E4(stale). ` + `\`akan sync ${scope.name}\` \uC744 \uC2E4\uD589\uD574 \uC7AC\uC0DD\uC131\uD558\uC138\uC694.`);
|
|
262
|
+
}
|
|
263
|
+
async#enforceRecipeGate(exec) {
|
|
264
|
+
const cwdPath = exec.cwdPath;
|
|
265
|
+
if (!cwdPath)
|
|
266
|
+
return;
|
|
267
|
+
const uiDir = path.join(cwdPath, "ui");
|
|
268
|
+
const sources = [
|
|
269
|
+
...await collectRecipeSources(uiDir, "ui/Recipe"),
|
|
270
|
+
...await collectRecipeSources(uiDir, "ui/recipe", "recipe")
|
|
271
|
+
];
|
|
272
|
+
if (sources.length === 0)
|
|
273
|
+
return;
|
|
274
|
+
const offenders = scanRecipes(sources).filter((recipe) => !Object.values(recipe.variants).some((values) => values.length >= 2 || values.length === 1 && values[0] === "true"));
|
|
275
|
+
if (offenders.length === 0)
|
|
276
|
+
return;
|
|
277
|
+
throw new Error(`[recipeGate] variant-less recipe(s): ${offenders.map((recipe) => recipe.name).join(", ")}
|
|
278
|
+
` + "\uACE0\uB97C \uC635\uC158 \uC5C6\uB294 look \uC740 recipe \uB85C \uB450\uC9C0 \uB9C8\uC138\uC694 \u2014 \uC790\uAE30 \uB9C8\uD06C\uC5C5\uC774 \uC788\uC73C\uBA74 \uCEF4\uD3EC\uB10C\uD2B8\uB85C \uC2B9\uACA9\uD558\uACE0, " + "\uB2E4\uB978 \uCEF4\uD3EC\uB10C\uD2B8\uC758 className \uC5D0 \uC8FC\uC785\uD558\uB294 \uC2A4\uD0A8\uC774\uBA74 \uACF5\uC720 \uD074\uB798\uC2A4 \uC0C1\uC218\uB85C \uB450\uC138\uC694.");
|
|
279
|
+
}
|
|
280
|
+
async#enforceStyleContract(exec) {
|
|
281
|
+
const cwdPath = exec.cwdPath;
|
|
282
|
+
if (!cwdPath)
|
|
283
|
+
return;
|
|
284
|
+
const stylesCssPath = path.join(cwdPath, "page", "styles.css");
|
|
285
|
+
const theme = await Bun.file(stylesCssPath).exists() ? new ThemeValidator().validate(await Bun.file(stylesCssPath).text()) : [];
|
|
286
|
+
const violations = { style: [], theme };
|
|
287
|
+
const blocking = countBlocking(violations);
|
|
288
|
+
if (blocking === 0)
|
|
289
|
+
return;
|
|
290
|
+
throw new Error(`[themeValidator] ${blocking} blocking contrast violation(s):
|
|
291
|
+
${formatStyleContract(violations)}
|
|
292
|
+
|
|
293
|
+
` + "\uD14C\uB9C8 \uD1A0\uD070 \uAC12\uC758 \uC804\uACBD/\uBC30\uACBD \uCF58\uD2B8\uB77C\uC2A4\uD2B8\uB97C WCAG \uAE30\uC900 \uC774\uC0C1\uC73C\uB85C \uC870\uC815\uD558\uC138\uC694.");
|
|
234
294
|
}
|
|
235
295
|
async writeTopLevelEnv(workspace, devProjectId) {
|
|
236
296
|
await workspace.writeFile(".env", `AKAN_WORKSPACE_ID=${devProjectId}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
FileSys
|
|
4
|
-
} from "./index-67546d0j.js";
|
|
5
2
|
import {
|
|
6
3
|
Spinner
|
|
7
4
|
} from "./index-6pz1j0zj.js";
|
|
5
|
+
import {
|
|
6
|
+
FileSys
|
|
7
|
+
} from "./index-67546d0j.js";
|
|
8
8
|
import"./index-r24hmh0q.js";
|
|
9
9
|
|
|
10
10
|
// pkgs/@akanjs/devkit/applicationReleasePackager.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
FileSys
|
|
4
|
-
} from "./index-67546d0j.js";
|
|
5
2
|
import {
|
|
6
3
|
Spinner
|
|
7
4
|
} from "./index-6pz1j0zj.js";
|
|
5
|
+
import {
|
|
6
|
+
FileSys
|
|
7
|
+
} from "./index-67546d0j.js";
|
|
8
8
|
|
|
9
9
|
// pkgs/@akanjs/devkit/cloud/globalConfig.ts
|
|
10
10
|
import { mkdir } from "fs/promises";
|