@akanjs/devkit 3.0.0-alpha.36 → 3.0.0-alpha.37
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.
|
@@ -14,9 +14,9 @@ language js(typescript, jsx)
|
|
|
14
14
|
//
|
|
15
15
|
// normalize `(v) => set(formatPhone(v))` -> the control's own `transform` prop, which every text and
|
|
16
16
|
// number `Field.*` already takes. Keep `onChange` a reference.
|
|
17
|
-
// composite `(v) => { set(v); other(v); }` -> a
|
|
18
|
-
//
|
|
19
|
-
//
|
|
17
|
+
// composite `(v) => { set(v); other(v); }` -> a `_postSet<Field>` method on the store, with the generated
|
|
18
|
+
// setter left on the control. A generated action cannot be
|
|
19
|
+
// overridden: mapped types make them properties (TS2425).
|
|
20
20
|
// nested `(v) => writeOnX('a.3.b', v)` -> unannotatable by design. An agent reaches an embedded row
|
|
21
21
|
// through `fill<Model>Form`, which waves composites through.
|
|
22
22
|
//
|
|
@@ -35,7 +35,7 @@ JsxAttribute() as $attr where {
|
|
|
35
35
|
$body <: r"\{?\s*(?:void\s+|await\s+)?st\.do\.[A-Za-z0-9_$]+\([A-Za-z_$][A-Za-z0-9_$]*\)\s*;?\s*\}?",
|
|
36
36
|
register_diagnostic(
|
|
37
37
|
span = $arrow,
|
|
38
|
-
message = "This arrow only forwards its argument, and an anonymous closure names no action — the control publishes no agent tool and emits no data-akan-action for the field. Pass the setter by reference: onChange={st.do.setTypeOnTicket}. A wrapper that does more is not reported: normalization belongs in the control's transform prop, a multi-write belongs in a
|
|
38
|
+
message = "This arrow only forwards its argument, and an anonymous closure names no action — the control publishes no agent tool and emits no data-akan-action for the field. Pass the setter by reference: onChange={st.do.setTypeOnTicket}. A wrapper that does more is not reported: normalization belongs in the control's transform prop, a multi-write belongs in a _postSet<Field> hook on the store, and a nested path through writeOnX is reached by the agent through fill<Model>Form.",
|
|
39
39
|
severity = "error"
|
|
40
40
|
)
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/devkit",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.37",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@langchain/openai": "^1.4.6",
|
|
46
46
|
"@tailwindcss/node": "^4.3.0",
|
|
47
47
|
"@trapezedev/project": "^7.1.4",
|
|
48
|
-
"akanjs": "3.0.0-alpha.
|
|
48
|
+
"akanjs": "3.0.0-alpha.37",
|
|
49
49
|
"chalk": "^5.6.2",
|
|
50
50
|
"commander": "^14.0.3",
|
|
51
51
|
"dayjs": "^1.11.20",
|
package/qualityScanner.ts
CHANGED
|
@@ -89,7 +89,7 @@ const SUGGESTED_RULES = [
|
|
|
89
89
|
"Keep apps/*/lib and libs/*/lib root files limited to generated support facets such as cnst.ts, db.ts, dict.ts, sig.ts, srv.ts, st.ts, useClient.ts, and useServer.ts.",
|
|
90
90
|
"Use domain module folders consistently: lib/<model> for database modules, lib/_<service> for service modules, and lib/__scalar/<scalar> for scalar modules.",
|
|
91
91
|
"Keep module UI filenames predictable: database modules use <Model>.Template/Unit/Util/View/Zone.tsx, service modules use <Service>.Util/Zone.tsx, and scalar modules use <Scalar>.Template/Unit.tsx.",
|
|
92
|
-
"Hand a form control its store setter by reference so the field publishes an agent tool; put normalization in the control's transform prop and a multi-write in a
|
|
92
|
+
"Hand a form control its store setter by reference so the field publishes an agent tool; put normalization in the control's transform prop and a multi-write in a _postSet<Field> hook on the store.",
|
|
93
93
|
"Move shared app utilities to apps/*/common instead of creating apps/*/base.",
|
|
94
94
|
"Avoid large mixed-purpose class files; class export files should import helpers from neighboring utility files instead of declaring them inline.",
|
|
95
95
|
];
|
|
@@ -125,7 +125,7 @@ const RULE_FIXES: Record<string, string> = {
|
|
|
125
125
|
"akan.file.prototype-mutation": "Avoid prototype mutation, or isolate it in an approved low-level integration file.",
|
|
126
126
|
"akan.file.class-export-global-declaration": "Move the helper to a sibling file and import it into the class module.",
|
|
127
127
|
"akan.agent.unpublished-form-setter":
|
|
128
|
-
"Pass the setter by reference where the wrapper only forwards (onChange={st.do.setTitleOnTask}); move normalization into the control's own transform prop; move a multi-write into a store
|
|
128
|
+
"Pass the setter by reference where the wrapper only forwards (onChange={st.do.setTitleOnTask}); move normalization into the control's own transform prop; move a multi-write into a _postSet<Field> hook on the store, keeping the generated setter on the control.",
|
|
129
129
|
"akan.file.component-internal-declaration":
|
|
130
130
|
"Move the type or helper to a type/util file in ui/, webkit/, or common/ by purpose. If it is the component's props, declare it as `interface <Component>Props`.",
|
|
131
131
|
"akan.file.component-export":
|