@akanjs/cli 3.1.0-rc.4 → 3.1.0-rc.6
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/{CodeAgent-ymte1tv8.js → CodeAgent-rkjyxgec.js} +2 -2
- package/{CodeTui-4rhdm1qw.js → CodeTui-h7pyj6xa.js} +1 -1
- package/TunnelShare-661cxz5e.js +14 -0
- package/{agent.command-r5x1mch5.js → agent.command-3qxf4xcj.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-3dkr7rdz.js → application.command-m1kcd7jf.js} +12 -11
- package/{applicationBuildRunner-h0j2swx1.js → applicationBuildRunner-dj0xkrep.js} +16 -9
- package/buildBatch.proc.js +7 -7
- package/{cloud.command-4kyxfw0y.js → cloud.command-3jzym8q7.js} +17 -16
- package/cloud.script-r4nskbc6.js +24 -0
- package/{code.command-sjvzt8fc.js → code.command-0ad6gw2a.js} +6 -6
- package/{context.command-j9frz0dz.js → context.command-0qx447mb.js} +17 -16
- package/context.runner-1vsjztjg.js +25 -0
- package/{dependencyScanner-06z2dmrr.js → dependencyScanner-3afj2vt1.js} +1 -1
- package/{guideline.command-1epw6hey.js → guideline.command-cv5bmrx2.js} +2 -2
- package/guidelines/conventions/conventions.instruction.md +450 -1084
- package/guidelines/cssRule/cssRule.instruction.md +16 -1
- package/guidelines/fieldRule/fieldRule.instruction.md +57 -0
- package/guidelines/framework/framework.instruction.md +4 -7
- package/guidelines/mcpRule/mcpRule.instruction.md +11 -8
- package/guidelines/modelConstant/modelConstant.instruction.md +2 -1
- package/guidelines/modelStore/modelStore.instruction.md +9 -0
- package/guidelines/pageRule/pageRule.instruction.md +80 -0
- package/guidelines/queryRule/queryRule.instruction.md +35 -8
- package/guidelines/runtimeRule/runtimeRule.instruction.md +89 -2
- package/guidelines/ssrRule/ssrRule.instruction.md +13 -0
- package/guidelines/transportRule/transportRule.instruction.md +76 -8
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +4 -4
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +49 -4
- package/incrementalBuilder.proc.js +4 -4
- package/{index-jw6st2rd.js → index-192ha4xh.js} +356 -307
- package/{index-1hkr7mrb.js → index-1p98exm2.js} +2 -2
- package/{index-8byzcvxp.js → index-1xj2t7cb.js} +7 -7
- package/{index-er3hekv9.js → index-20bxxyvn.js} +80 -80
- package/{index-xe3x2kw5.js → index-35hc95h5.js} +1 -1
- package/{index-p5nrc5he.js → index-4mhy6qme.js} +4 -4
- package/{index-0qc5nd61.js → index-5edzv8fn.js} +5 -5
- package/{index-k9rrten6.js → index-5nd1wtkv.js} +92 -94
- package/index-62md4dwy.js +260 -0
- package/{index-z3v7abrk.js → index-665zp9rs.js} +38 -15
- package/{index-1t2xw0p0.js → index-6xn2n442.js} +4 -4
- package/{index-jg3fj8h0.js → index-86jt2a0e.js} +1 -1
- package/{index-k33me5sp.js → index-8fp3b47h.js} +419 -418
- package/{index-shastb7m.js → index-9z426msb.js} +17 -12
- package/{index-gdybjw3x.js → index-awbdfcf2.js} +4 -4
- package/{index-3hx1z96c.js → index-bqbf654f.js} +1 -1
- package/{index-jppthsff.js → index-cpb3nvma.js} +57 -58
- package/{index-b60ccq2s.js → index-d47ypebv.js} +17 -15
- package/{index-gc05vqd2.js → index-d72hfmdm.js} +13 -13
- package/{index-akha197v.js → index-fmzcs8v6.js} +4 -4
- package/{index-28ftaz3d.js → index-fyq1z6kt.js} +29 -27
- package/{index-vwmv64ad.js → index-g1mbppa9.js} +238 -236
- package/{index-hedt951c.js → index-h47cf1gg.js} +7 -7
- package/{index-hfqs9jvc.js → index-j4mkhz93.js} +3 -3
- package/{index-08a5ga6n.js → index-jw1zm273.js} +28 -30
- package/{index-q958tqqg.js → index-m9jj544v.js} +1 -1
- package/{index-8935h3n1.js → index-mdjc93e1.js} +1 -1
- package/{index-2wyn17fa.js → index-pydbnfez.js} +2 -2
- package/{index-bjh4wbtk.js → index-qwa5k1j8.js} +1 -1
- package/{index-81a1ywp6.js → index-tamvyvj3.js} +3 -3
- package/{index-dez4t5sd.js → index-trpasv9q.js} +260 -259
- package/{index-2ahj896a.js → index-tvehn2sp.js} +1 -1
- package/{index-2k0t8p3p.js → index-va06nr10.js} +1086 -1075
- package/{index-9c3cd767.js → index-vk0pa0mn.js} +20 -21
- package/{index-qyaqzh8e.js → index-w44cy4vs.js} +2216 -2216
- package/index.js +22 -22
- package/{library.command-n58dgakb.js → library.command-erp2f56n.js} +3 -3
- package/{localRegistry.command-f2768sww.js → localRegistry.command-xxpqgxjw.js} +15 -14
- package/{module.command-xzjg5k7n.js → module.command-gs2r615e.js} +5 -5
- package/{package.command-24sh1j1q.js → package.command-7343f74r.js} +4 -4
- package/package.json +2 -2
- package/{page.command-fqnm88na.js → page.command-4h4a8pnh.js} +3 -3
- package/{pipeline.command-vn6taz75.js → pipeline.command-a2nrk26m.js} +3 -3
- package/{primitive.command-4j1g1a0d.js → primitive.command-w6t0asqz.js} +6 -6
- package/{projectTypecheck-3y7ayty0.js → projectTypecheck-f534enqj.js} +1 -1
- package/{quality.command-5hqmcdwt.js → quality.command-77x7vbbx.js} +4 -4
- package/{repair.command-rw5tk460.js → repair.command-y6sstev7.js} +5 -5
- package/{scalar.command-0jpap45m.js → scalar.command-20b8cy0k.js} +4 -4
- package/{subspace.command-y7n9sghk.js → subspace.command-92xkc0s0.js} +11 -10
- package/templates/lib/cnst.ts +0 -1
- package/templates/workspaceRoot/.gitignore.template +24 -53
- package/{tunnel.command-5gjwh1f8.js → tunnel.command-2kw8vt9g.js} +8 -7
- package/{workflow.command-3t22f7eb.js → workflow.command-2djwmpqf.js} +10 -10
- package/{workspace.command-cq5xg2jq.js → workspace.command-5se6spqb.js} +28 -27
- package/TunnelShare-p8ymkww8.js +0 -13
- package/cloud.script-jc3hc5d9.js +0 -23
- package/context.runner-v0def5my.js +0 -24
- package/index-n68jx79w.js +0 -120
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
runner,
|
|
6
6
|
script,
|
|
7
7
|
command
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-jw1zm273.js";
|
|
9
9
|
import {
|
|
10
10
|
FileSys2
|
|
11
11
|
} from "./index-52w0fvh8.js";
|
|
@@ -19,57 +19,58 @@ import {
|
|
|
19
19
|
AppExecutor,
|
|
20
20
|
LibExecutor,
|
|
21
21
|
PkgExecutor
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-va06nr10.js";
|
|
23
23
|
import {
|
|
24
24
|
countBlocking,
|
|
25
25
|
formatStyleContract,
|
|
26
26
|
ThemeValidator
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-62md4dwy.js";
|
|
28
28
|
import {
|
|
29
29
|
collectRecipeSources2,
|
|
30
30
|
scanRecipes2
|
|
31
31
|
} from "./index-hj6w4ka1.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
import"./index-trpasv9q.js";
|
|
33
|
+
import"./index-5edzv8fn.js";
|
|
34
34
|
import"./index-zzvvc845.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentScript
|
|
37
|
-
} from "./index-
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
37
|
+
} from "./index-tamvyvj3.js";
|
|
38
|
+
import"./index-5nd1wtkv.js";
|
|
39
|
+
import"./index-vk0pa0mn.js";
|
|
40
|
+
import"./index-m9jj544v.js";
|
|
41
|
+
import"./index-g1mbppa9.js";
|
|
42
|
+
import"./index-192ha4xh.js";
|
|
42
43
|
import {
|
|
43
44
|
LibraryScript
|
|
44
|
-
} from "./index-
|
|
45
|
+
} from "./index-pydbnfez.js";
|
|
45
46
|
import {
|
|
46
47
|
ApplicationScript
|
|
47
|
-
} from "./index-
|
|
48
|
+
} from "./index-d47ypebv.js";
|
|
48
49
|
import"./index-7md2g9vw.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
50
|
+
import"./index-cpb3nvma.js";
|
|
51
|
+
import"./index-tvehn2sp.js";
|
|
51
52
|
import {
|
|
52
53
|
PackageScript
|
|
53
|
-
} from "./index-
|
|
54
|
+
} from "./index-6xn2n442.js";
|
|
54
55
|
import {
|
|
55
56
|
getNpmRegistryUrl,
|
|
56
57
|
getLatestPackageVersion
|
|
57
|
-
} from "./index-
|
|
58
|
+
} from "./index-fyq1z6kt.js";
|
|
58
59
|
import {
|
|
59
60
|
CloudScript2
|
|
60
|
-
} from "./index-
|
|
61
|
-
import"./index-
|
|
62
|
-
import"./index-
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-
|
|
61
|
+
} from "./index-h47cf1gg.js";
|
|
62
|
+
import"./index-d72hfmdm.js";
|
|
63
|
+
import"./index-j4mkhz93.js";
|
|
64
|
+
import"./index-86jt2a0e.js";
|
|
65
|
+
import"./index-fmzcs8v6.js";
|
|
66
|
+
import"./index-awbdfcf2.js";
|
|
67
|
+
import"./index-1p98exm2.js";
|
|
68
|
+
import"./index-1xj2t7cb.js";
|
|
68
69
|
import {
|
|
69
70
|
ContextScript
|
|
70
|
-
} from "./index-
|
|
71
|
-
import"./index-
|
|
72
|
-
import"./index-
|
|
71
|
+
} from "./index-4mhy6qme.js";
|
|
72
|
+
import"./index-35hc95h5.js";
|
|
73
|
+
import"./index-665zp9rs.js";
|
|
73
74
|
|
|
74
75
|
// pkgs/@akanjs/cli/workspace/workspace.runner.ts
|
|
75
76
|
import { mkdir, writeFile } from "fs/promises";
|
package/TunnelShare-p8ymkww8.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
TunnelShare2
|
|
4
|
-
} from "./index-bjh4wbtk.js";
|
|
5
|
-
import"./index-jppthsff.js";
|
|
6
|
-
import"./index-vwmv64ad.js";
|
|
7
|
-
import"./index-z3v7abrk.js";
|
|
8
|
-
import"./index-jw6st2rd.js";
|
|
9
|
-
import"./index-2k0t8p3p.js";
|
|
10
|
-
import"./index-52w0fvh8.js";
|
|
11
|
-
export {
|
|
12
|
-
TunnelShare2 as TunnelShare
|
|
13
|
-
};
|
package/cloud.script-jc3hc5d9.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
CloudScript2
|
|
4
|
-
} from "./index-hedt951c.js";
|
|
5
|
-
import"./index-28ftaz3d.js";
|
|
6
|
-
import"./index-b60ccq2s.js";
|
|
7
|
-
import"./index-xe3x2kw5.js";
|
|
8
|
-
import"./index-2wyn17fa.js";
|
|
9
|
-
import"./index-1t2xw0p0.js";
|
|
10
|
-
import"./index-9c3cd767.js";
|
|
11
|
-
import"./index-jppthsff.js";
|
|
12
|
-
import"./index-vwmv64ad.js";
|
|
13
|
-
import"./index-08a5ga6n.js";
|
|
14
|
-
import"./index-7md2g9vw.js";
|
|
15
|
-
import"./index-z3v7abrk.js";
|
|
16
|
-
import"./index-k9rrten6.js";
|
|
17
|
-
import"./index-jw6st2rd.js";
|
|
18
|
-
import"./index-2k0t8p3p.js";
|
|
19
|
-
import"./index-2ahj896a.js";
|
|
20
|
-
import"./index-52w0fvh8.js";
|
|
21
|
-
export {
|
|
22
|
-
CloudScript2 as CloudScript
|
|
23
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
ContextRunner2
|
|
4
|
-
} from "./index-gc05vqd2.js";
|
|
5
|
-
import"./index-8byzcvxp.js";
|
|
6
|
-
import"./index-1hkr7mrb.js";
|
|
7
|
-
import"./index-gdybjw3x.js";
|
|
8
|
-
import"./index-hfqs9jvc.js";
|
|
9
|
-
import"./index-akha197v.js";
|
|
10
|
-
import"./index-jg3fj8h0.js";
|
|
11
|
-
import"./index-9c3cd767.js";
|
|
12
|
-
import"./index-vwmv64ad.js";
|
|
13
|
-
import"./index-0qc5nd61.js";
|
|
14
|
-
import"./index-dez4t5sd.js";
|
|
15
|
-
import"./index-zzvvc845.js";
|
|
16
|
-
import"./index-08a5ga6n.js";
|
|
17
|
-
import"./index-z3v7abrk.js";
|
|
18
|
-
import"./index-jw6st2rd.js";
|
|
19
|
-
import"./index-2k0t8p3p.js";
|
|
20
|
-
import"./index-hj6w4ka1.js";
|
|
21
|
-
import"./index-52w0fvh8.js";
|
|
22
|
-
export {
|
|
23
|
-
ContextRunner2 as ContextRunner
|
|
24
|
-
};
|
package/index-n68jx79w.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// pkgs/@akanjs/devkit/frontendBuild/styleContract.ts
|
|
3
|
-
var countBlocking = (violations) => violations.theme.length;
|
|
4
|
-
var formatStyleContract = (violations) => violations.theme.flatMap((theme) => [
|
|
5
|
-
` [error] contrast ${theme.scope} ${theme.pair} = ${theme.ratio}:1 (min ${theme.threshold}:1)`,
|
|
6
|
-
` \u2192 ${theme.suggestion}`
|
|
7
|
-
]).join(`
|
|
8
|
-
`);
|
|
9
|
-
|
|
10
|
-
// pkgs/@akanjs/devkit/frontendBuild/themeValidator.ts
|
|
11
|
-
var PAIRS = [
|
|
12
|
-
{ base: "background", fg: "foreground", threshold: 4.5 },
|
|
13
|
-
{ base: "primary", fg: "primary-foreground", threshold: 4.5 },
|
|
14
|
-
{ base: "secondary", fg: "secondary-foreground", threshold: 4.5 },
|
|
15
|
-
{ base: "accent", fg: "accent-foreground", threshold: 4.5 },
|
|
16
|
-
{ base: "neutral", fg: "neutral-foreground", threshold: 4.5 },
|
|
17
|
-
{ base: "card", fg: "card-foreground", threshold: 4.5 },
|
|
18
|
-
{ base: "popover", fg: "popover-foreground", threshold: 4.5 },
|
|
19
|
-
{ base: "muted", fg: "muted-foreground", threshold: 3 },
|
|
20
|
-
{ base: "info", fg: "info-foreground", threshold: 3 },
|
|
21
|
-
{ base: "success", fg: "success-foreground", threshold: 3 },
|
|
22
|
-
{ base: "warning", fg: "warning-foreground", threshold: 3 },
|
|
23
|
-
{ base: "destructive", fg: "destructive-foreground", threshold: 3 },
|
|
24
|
-
{ base: "open", fg: "open-foreground", threshold: 3 }
|
|
25
|
-
];
|
|
26
|
-
var THEME_SCOPES = new Set([":root", '[data-theme="dark"]', '[data-theme="light"]']);
|
|
27
|
-
|
|
28
|
-
class ThemeValidator {
|
|
29
|
-
validate(css) {
|
|
30
|
-
const tokensByScope = ThemeValidator.parseThemeTokens(css);
|
|
31
|
-
const violations = [];
|
|
32
|
-
for (const [scope, tokens] of Object.entries(tokensByScope)) {
|
|
33
|
-
if (!THEME_SCOPES.has(scope))
|
|
34
|
-
continue;
|
|
35
|
-
violations.push(...this.validateScope(tokens, scope));
|
|
36
|
-
}
|
|
37
|
-
return violations;
|
|
38
|
-
}
|
|
39
|
-
validateScope(tokens, scope) {
|
|
40
|
-
const violations = [];
|
|
41
|
-
for (const { base, fg, threshold } of PAIRS) {
|
|
42
|
-
const bg = tokens[base];
|
|
43
|
-
const front = tokens[fg];
|
|
44
|
-
if (!bg || !front)
|
|
45
|
-
continue;
|
|
46
|
-
const bgRgb = ThemeValidator.parseHex(bg);
|
|
47
|
-
const fgRgb = ThemeValidator.parseHex(front);
|
|
48
|
-
if (!bgRgb || !fgRgb)
|
|
49
|
-
continue;
|
|
50
|
-
const ratio = ThemeValidator.contrastRatio(bgRgb, fgRgb);
|
|
51
|
-
if (ratio >= threshold)
|
|
52
|
-
continue;
|
|
53
|
-
violations.push({
|
|
54
|
-
scope,
|
|
55
|
-
pair: `${base} / ${fg}`,
|
|
56
|
-
background: bg,
|
|
57
|
-
foreground: front,
|
|
58
|
-
ratio: Math.round(ratio * 100) / 100,
|
|
59
|
-
threshold,
|
|
60
|
-
suggestion: `In ${scope}, --${base} (${bg}) against --${fg} (${front}) is ${ratio.toFixed(2)}:1, under the ${threshold}:1 minimum. Lighten or darken one of them until it clears.`
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
return violations;
|
|
64
|
-
}
|
|
65
|
-
static parseThemeTokens(css) {
|
|
66
|
-
const result = {};
|
|
67
|
-
const blockRe = /(?:^|})\s*([^{}@]+?)\s*\{([^{}]*)\}/g;
|
|
68
|
-
for (const block of css.matchAll(blockRe)) {
|
|
69
|
-
const selectors = block[1].split(",").map((s) => s.trim());
|
|
70
|
-
const relevant = selectors.filter((s) => THEME_SCOPES.has(ThemeValidator.#normalizeScope(s)));
|
|
71
|
-
if (relevant.length === 0)
|
|
72
|
-
continue;
|
|
73
|
-
const decls = {};
|
|
74
|
-
for (const decl of block[2].matchAll(/--([\w-]+)\s*:\s*([^;]+?)\s*(?:;|$)/g)) {
|
|
75
|
-
decls[decl[1]] = decl[2].trim();
|
|
76
|
-
}
|
|
77
|
-
for (const selector of relevant) {
|
|
78
|
-
const scope = ThemeValidator.#normalizeScope(selector);
|
|
79
|
-
result[scope] = { ...result[scope] ?? {}, ...decls };
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
static #normalizeScope(selector) {
|
|
85
|
-
return selector.replace(/\[data-theme=['"]?([\w-]+)['"]?\]/g, '[data-theme="$1"]').trim();
|
|
86
|
-
}
|
|
87
|
-
static parseHex(value) {
|
|
88
|
-
const v = value.trim();
|
|
89
|
-
if (!v.startsWith("#"))
|
|
90
|
-
return null;
|
|
91
|
-
const hex = v.slice(1);
|
|
92
|
-
let full;
|
|
93
|
-
if (hex.length === 3 || hex.length === 4)
|
|
94
|
-
full = hex.slice(0, 3).split("").map((c) => c + c).join("");
|
|
95
|
-
else if (hex.length === 6 || hex.length === 8)
|
|
96
|
-
full = hex.slice(0, 6);
|
|
97
|
-
else
|
|
98
|
-
return null;
|
|
99
|
-
if (!/^[0-9a-fA-F]{6}$/.test(full))
|
|
100
|
-
return null;
|
|
101
|
-
const n = Number.parseInt(full, 16);
|
|
102
|
-
return [n >> 16 & 255, n >> 8 & 255, n & 255];
|
|
103
|
-
}
|
|
104
|
-
static #relativeLuminance([r, g, b]) {
|
|
105
|
-
const channel = (c) => {
|
|
106
|
-
const s = c / 255;
|
|
107
|
-
return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
108
|
-
};
|
|
109
|
-
return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);
|
|
110
|
-
}
|
|
111
|
-
static contrastRatio(a, b) {
|
|
112
|
-
const la = ThemeValidator.#relativeLuminance(a);
|
|
113
|
-
const lb = ThemeValidator.#relativeLuminance(b);
|
|
114
|
-
const hi = Math.max(la, lb);
|
|
115
|
-
const lo = Math.min(la, lb);
|
|
116
|
-
return (hi + 0.05) / (lo + 0.05);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export { countBlocking, formatStyleContract, ThemeValidator };
|