@akanjs/cli 3.0.0-alpha.11 → 3.0.0-alpha.12
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/{application.command-rdm3et0g.js → application.command-rp3y4ejb.js} +1 -1
- package/{applicationBuildRunner-6m8n71w4.js → applicationBuildRunner-73kbbb7e.js} +1 -1
- package/buildBatch.proc.js +1 -1
- package/{cloud.command-56aeekqn.js → cloud.command-7mcmm52j.js} +3 -3
- package/guidelines/conventions/conventions.instruction.md +1 -1
- package/{index-bzznxgcx.js → index-5yjc80ha.js} +1 -1
- package/{index-a5cs7d8r.js → index-k8gpsrm1.js} +2 -2
- package/{index-nwqqssnb.js → index-rdv33eye.js} +1 -1
- package/{index-cav1azma.js → index-wzdeact3.js} +21 -3
- package/index.js +4 -4
- package/{localRegistry.command-649g1n7b.js → localRegistry.command-f75tqg9w.js} +2 -2
- package/package.json +2 -2
- package/{workspace.command-xhyhajxa.js → workspace.command-x49ekpkt.js} +3 -3
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
84acd2086ed367dc670ca155f5d5f884d8af105b3527914ac5ba312e3e1985e6
|
package/buildBatch.proc.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudScript
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-k8gpsrm1.js";
|
|
5
|
+
import"./index-rdv33eye.js";
|
|
6
6
|
import"./index-h5whaj26.js";
|
|
7
7
|
import {
|
|
8
8
|
GlobalConfig
|
|
9
9
|
} from "./index-0cj2zxbm.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-5yjc80ha.js";
|
|
11
11
|
import"./index-8pd02prk.js";
|
|
12
12
|
import"./index-76rn3g2c.js";
|
|
13
13
|
import {
|
|
@@ -272,7 +272,7 @@ Full version with code, the `Tab` composition example, and a review checklist: `
|
|
|
272
272
|
- Conditional render is `cond ? <X/> : null`. Never `{cond && <X/>}` — in a `className` context it renders the literal string `"false"`. Early `return null` is for guard clauses only.
|
|
273
273
|
- Never hand-roll loading, empty, or list states. Use `Load.Units` / `Load.View` / `Load.Edit` with `renderItem`, `renderList`, `renderView`, and `renderEmpty`; `<Empty />` for a bare placeholder; and `Model.New` / `Model.Edit` / `Model.SureToRemove` for CRUD modals.
|
|
274
274
|
- Avoid hooks. `useState` is for modal-open, tab, draft-input, and drag state only — never for server data. `useEffect` must be a genuine effect such as subscribe-with-cleanup or one-shot init. Prefer `Tab` over a `useState` mode switch. `.Template.tsx` files contain zero `useState`.
|
|
275
|
-
- Forms are entirely store-driven: `value={xForm.field}` with `onChange={st.do.setFieldOnX}`, the setter passed by reference. Always use `Field.*`, never a bare `<input>` for a model field. Nested rows use `st.do.writeOnX("payments.3.name", v)` plus the generated `add<Field>OnX` / `sub<Field>OnX`.
|
|
275
|
+
- Forms are entirely store-driven: `value={xForm.field}` with `onChange={st.do.setFieldOnX}`, the setter passed by reference. Always use `Field.*`, never a bare `<input>` for a model field. Nested rows use `st.do.writeOnX("payments.3.name", v)` plus the generated `add<Field>OnX` / `sub<Field>OnX`. **Passing the setter by reference is also what makes the framework emit `data-akan-action` / `data-akan-state`** on the control — the annotation an in-page agent, an E2E selector, and an external browser agent all read. Wrapping it in an inline arrow (`onChange={(v) => st.do.setFieldOnX(v)}`) silently drops that: a closure the caller wrote says nothing about what it does. Never hand-write a `data-akan-*` attribute.
|
|
276
276
|
- Read with `st.use.*` and write with `st.do.*`. Client components do not call `fetch.*`.
|
|
277
277
|
- Static class strings stay plain strings. Reach for `cn` only for a conditional or to merge an incoming `className`, and merge the caller last: `cn("base classes", cond && "extra", className)`. `cn` comes from `akanjs/client` (token-aware tailwind-merge) and is the only class-combining function — no `clsx` (removed), no raw `twMerge` imports, no object syntax (`{ x: cond }` → `cond && "x"`).
|
|
278
278
|
- Multi-slot components take extra named props (`wrapperClassName`, `bodyClassName`), never a `classNames` object.
|
|
@@ -1898,7 +1898,7 @@ function openBrowser(url) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
|
|
1900
1900
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
1901
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
1901
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-73kbbb7e.js")).ApplicationBuildRunner;
|
|
1902
1902
|
var loadReleasePackager = async () => (await import("./applicationReleasePackager-gg8ccbeh.js")).ApplicationReleasePackager;
|
|
1903
1903
|
var loadCapacitorApp = async () => (await import("./capacitorApp-mr81qdxq.js")).CapacitorApp;
|
|
1904
1904
|
var loadAbstractCompactor = async () => (await import("./abstractCompactor-e5yq60qz.js")).AbstractCompactor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudRunner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-rdv33eye.js";
|
|
5
5
|
import {
|
|
6
6
|
PackageScript
|
|
7
7
|
} from "./index-h5whaj26.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./index-0cj2zxbm.js";
|
|
13
13
|
import {
|
|
14
14
|
ApplicationScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-5yjc80ha.js";
|
|
16
16
|
import {
|
|
17
17
|
script
|
|
18
18
|
} from "./index-etwh7sd3.js";
|
|
@@ -1036,6 +1036,7 @@ class CssCompiler {
|
|
|
1036
1036
|
#resolvedFileCache = new Map;
|
|
1037
1037
|
#resolvedSpecifierCache = new Map;
|
|
1038
1038
|
#discoveredCssPaths = new Set;
|
|
1039
|
+
#importedStylesheets = new Map;
|
|
1039
1040
|
#fileExists(absPath) {
|
|
1040
1041
|
let cached = this.#fileExistsCache.get(absPath);
|
|
1041
1042
|
if (!cached) {
|
|
@@ -1204,11 +1205,12 @@ class CssCompiler {
|
|
|
1204
1205
|
async compileCss(cssPaths, sourcePaths) {
|
|
1205
1206
|
if (cssPaths.length === 0)
|
|
1206
1207
|
return "";
|
|
1208
|
+
this.#importedStylesheets.clear();
|
|
1207
1209
|
const compileStarted = Date.now();
|
|
1208
1210
|
const compilers = await Promise.all(cssPaths.map(async (cssPath) => {
|
|
1209
|
-
const
|
|
1211
|
+
const css2 = await Bun.file(cssPath).text();
|
|
1210
1212
|
const base = path8.dirname(cssPath);
|
|
1211
|
-
const compiler = await compile(
|
|
1213
|
+
const compiler = await compile(css2, {
|
|
1212
1214
|
base,
|
|
1213
1215
|
loadStylesheet: (id, fromBase) => this.#loadStylesheet(id, fromBase),
|
|
1214
1216
|
loadModule: (id, fromBase) => this.#loadModule(id, fromBase)
|
|
@@ -1232,13 +1234,25 @@ class CssCompiler {
|
|
|
1232
1234
|
parts.push(entry.compiler.build(candidates));
|
|
1233
1235
|
}
|
|
1234
1236
|
this.#logger.verbose(`css compiled paths=${cssPaths.length} candidates=${candidates.length} in ${Date.now() - compileStarted}ms`);
|
|
1235
|
-
|
|
1237
|
+
const css = parts.join(`
|
|
1236
1238
|
`);
|
|
1239
|
+
this.#warnDroppedImports(css);
|
|
1240
|
+
return css;
|
|
1241
|
+
}
|
|
1242
|
+
#warnDroppedImports(css) {
|
|
1243
|
+
for (const [cssPath, content] of this.#importedStylesheets) {
|
|
1244
|
+
const names = declaredCustomProperties(content);
|
|
1245
|
+
if (names.length === 0 || names.some((name) => css.includes(`${name}:`)))
|
|
1246
|
+
continue;
|
|
1247
|
+
this.#logger.warn(`css @import ${cssPath} was loaded but none of its ${names.length} declaration(s) reached the compiled CSS`);
|
|
1248
|
+
}
|
|
1237
1249
|
}
|
|
1238
1250
|
async#loadStylesheet(id, fromBase) {
|
|
1239
1251
|
const p = await this.#resolveCssImport(id, fromBase);
|
|
1240
1252
|
this.#discoveredCssPaths.add(p);
|
|
1241
1253
|
const content = await Bun.file(p).text();
|
|
1254
|
+
this.#importedStylesheets.set(p, content);
|
|
1255
|
+
this.#logger.verbose(`css import "${id}" from ${fromBase} -> ${p} (${content.length} bytes)`);
|
|
1242
1256
|
return { path: p, base: path8.dirname(p), content };
|
|
1243
1257
|
}
|
|
1244
1258
|
async#resolveCssImport(id, fromBase) {
|
|
@@ -1332,6 +1346,10 @@ function isSourceFile(filePath) {
|
|
|
1332
1346
|
function isIgnoredNodeModuleSource(filePath) {
|
|
1333
1347
|
return NODE_MODULES_RE.test(filePath) && !AKANJS_NODE_MODULE_RE.test(filePath);
|
|
1334
1348
|
}
|
|
1349
|
+
function declaredCustomProperties(css) {
|
|
1350
|
+
const withoutThemeBlocks = css.replace(/@theme[^{]*\{[^}]*\}/g, "");
|
|
1351
|
+
return [...new Set([...withoutThemeBlocks.matchAll(/(?:^|[\s;{])(--[\w-]+)\s*:/g)].map(([, name]) => name))].filter((name) => !!name);
|
|
1352
|
+
}
|
|
1335
1353
|
function getPageKeyBasePath(pageKey, basePaths) {
|
|
1336
1354
|
const normalized = pageKey.split(path8.sep).join("/").replace(/^\.\//, "");
|
|
1337
1355
|
const segments = normalized.split("/");
|
package/index.js
CHANGED
|
@@ -18,16 +18,16 @@ import path from "path";
|
|
|
18
18
|
|
|
19
19
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
20
20
|
var commandModules = {
|
|
21
|
-
workspace: async () => (await import("./workspace.command-
|
|
21
|
+
workspace: async () => (await import("./workspace.command-x49ekpkt.js")).WorkspaceCommand,
|
|
22
22
|
agent: async () => (await import("./agent.command-a3n15c6t.js")).AgentCommand,
|
|
23
|
-
application: async () => (await import("./application.command-
|
|
23
|
+
application: async () => (await import("./application.command-rp3y4ejb.js")).ApplicationCommand,
|
|
24
24
|
library: async () => (await import("./library.command-x6t29a30.js")).LibraryCommand,
|
|
25
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
25
|
+
localRegistry: async () => (await import("./localRegistry.command-f75tqg9w.js")).LocalRegistryCommand,
|
|
26
26
|
package: async () => (await import("./package.command-zgy7f3fz.js")).PackageCommand,
|
|
27
27
|
module: async () => (await import("./module.command-8w8ys5t3.js")).ModuleCommand,
|
|
28
28
|
page: async () => (await import("./page.command-yjmnkyk2.js")).PageCommand,
|
|
29
29
|
context: async () => (await import("./context.command-ysxawe7h.js")).ContextCommand,
|
|
30
|
-
cloud: async () => (await import("./cloud.command-
|
|
30
|
+
cloud: async () => (await import("./cloud.command-7mcmm52j.js")).CloudCommand,
|
|
31
31
|
guideline: async () => (await import("./guideline.command-yqf9a372.js")).GuidelineCommand,
|
|
32
32
|
scalar: async () => (await import("./scalar.command-9dhmqhtm.js")).ScalarCommand,
|
|
33
33
|
primitive: async () => (await import("./primitive.command-gfqaagsg.js")).PrimitiveCommand,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CloudRunner,
|
|
4
4
|
getNpmRegistryUrl
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-rdv33eye.js";
|
|
6
6
|
import {
|
|
7
7
|
PackageScript
|
|
8
8
|
} from "./index-h5whaj26.js";
|
|
9
9
|
import"./index-0cj2zxbm.js";
|
|
10
10
|
import {
|
|
11
11
|
ApplicationScript
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-5yjc80ha.js";
|
|
13
13
|
import"./index-8pd02prk.js";
|
|
14
14
|
import"./index-76rn3g2c.js";
|
|
15
15
|
import {
|
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.12",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -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.12",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
39
|
"commander": "^14.0.3",
|
|
40
40
|
"dayjs": "^1.11.20",
|
|
@@ -11,11 +11,11 @@ import"./index-ss469dec.js";
|
|
|
11
11
|
import"./index-65aeh789.js";
|
|
12
12
|
import {
|
|
13
13
|
CloudScript
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-k8gpsrm1.js";
|
|
15
15
|
import {
|
|
16
16
|
getLatestPackageVersion,
|
|
17
17
|
getNpmRegistryUrl
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-rdv33eye.js";
|
|
19
19
|
import {
|
|
20
20
|
PackageScript
|
|
21
21
|
} from "./index-h5whaj26.js";
|
|
@@ -31,7 +31,7 @@ import"./index-kcsa1zff.js";
|
|
|
31
31
|
import"./index-j37qq1f2.js";
|
|
32
32
|
import {
|
|
33
33
|
ApplicationScript
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-5yjc80ha.js";
|
|
35
35
|
import {
|
|
36
36
|
LibraryScript
|
|
37
37
|
} from "./index-8pd02prk.js";
|