@akanjs/cli 3.0.0-alpha.7 → 3.0.0-alpha.71
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-pggr92jj.js → agent.command-xdvw642m.js} +9 -7
- package/{application.command-692yap1d.js → application.command-g3f7xj25.js} +31 -6
- package/{applicationBuildRunner-ha3y8ew8.js → applicationBuildRunner-af0wtspv.js} +19 -14
- package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-93nzdfsy.js} +1 -1
- package/buildBatch.proc.js +7 -5
- package/{capacitorApp-p0z5yab2.js → capacitorApp-b0ppke3m.js} +29 -27
- package/{cloud.command-wqfsyzv2.js → cloud.command-0hmsv44q.js} +12 -10
- package/commandManifest.json +1 -1
- package/{context.command-9bxtdn0w.js → context.command-x92afrnf.js} +17 -15
- package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
- package/getDirname-ka11hm7e.js +8 -0
- package/{guideline.command-nfqahxex.js → guideline.command-hpq08q66.js} +8 -6
- package/guidelines/agentRule/agentRule.generate.json +31 -0
- package/guidelines/agentRule/agentRule.instruction.md +525 -0
- package/guidelines/conventions/conventions.generate.json +25 -0
- package/guidelines/conventions/conventions.instruction.md +839 -0
- package/guidelines/cssRule/cssRule.instruction.md +7 -0
- package/guidelines/framework/framework.generate.json +3 -2
- package/guidelines/framework/framework.instruction.md +1 -9
- package/guidelines/mcpRule/mcpRule.generate.json +25 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +217 -0
- package/guidelines/queryRule/queryRule.generate.json +31 -0
- package/guidelines/queryRule/queryRule.instruction.md +143 -0
- package/guidelines/runtimeRule/runtimeRule.generate.json +25 -0
- package/guidelines/runtimeRule/runtimeRule.instruction.md +176 -0
- package/guidelines/transportRule/transportRule.generate.json +31 -0
- package/guidelines/transportRule/transportRule.instruction.md +60 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +24 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +263 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +33 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +402 -0
- package/incrementalBuilder.proc.js +8 -6
- package/index-1577bej2.js +7 -0
- package/{index-vg0sj9nc.js → index-5f4gnt4c.js} +258 -97
- package/{index-bjpxzr6s.js → index-5vy2jzar.js} +1 -1
- package/{index-mssqn2sq.js → index-6d5r8q6k.js} +54 -15
- package/{index-p3f4q532.js → index-737aj4fm.js} +14 -13
- package/{index-2c3e2xh8.js → index-8besc14m.js} +1 -1
- package/{index-qb61h0k7.js → index-abyjt72y.js} +333 -540
- package/{index-xhgtkekh.js → index-cbfp5wyp.js} +1 -1
- package/{index-5dw57f0d.js → index-cp00yns2.js} +80 -14
- package/{index-ztpw544k.js → index-ety6takb.js} +3 -3
- package/index-f39512t6.js +255 -0
- package/{index-6rhabeev.js → index-gvq17wqn.js} +5 -3
- package/{index-js368gk9.js → index-hs70d8ed.js} +6 -6
- package/{index-7myvn0f0.js → index-j37qq1f2.js} +1 -1
- package/{index-azv0xjb5.js → index-jybbmwed.js} +8 -4
- package/{index-4hek879p.js → index-m5gfc86a.js} +1 -1
- package/{index-w6wbb612.js → index-nq3avsf6.js} +13 -13
- package/{index-vtj3zps1.js → index-p27h7535.js} +8 -8
- package/{index-5pmx7bkg.js → index-pehn44hr.js} +3 -3
- package/{index-j9cxndc0.js → index-qnv0aqmm.js} +9 -6
- package/{index-gmy45vz2.js → index-r691v756.js} +4 -4
- package/{index-0cj2zxbm.js → index-sh01r3pm.js} +1 -1
- package/{index-a1e0j63x.js → index-sqsfv8wg.js} +15 -7
- package/{index-gex7c8kd.js → index-wbbswwqt.js} +51 -24
- package/{index-bz2sfzzt.js → index-wybbcgxn.js} +4 -4
- package/index.js +21 -19
- package/{library.command-md9715jz.js → library.command-8vgrdtwy.js} +6 -4
- package/{localRegistry.command-exkbamyj.js → localRegistry.command-0gtqj0r0.js} +11 -9
- package/{module.command-w5aaddxk.js → module.command-rama4zya.js} +10 -8
- package/{package.command-yfkrcy0z.js → package.command-6jxapdsg.js} +6 -4
- package/package.json +4 -5
- package/{page.command-echbavp4.js → page.command-hxy7x525.js} +6 -4
- package/{primitive.command-9fbhspw2.js → primitive.command-4bf6xcc3.js} +11 -9
- package/{quality.command-3pnt9yep.js → quality.command-h5edwegz.js} +192 -97
- package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
- package/{repair.command-carj4vax.js → repair.command-rgqf6px6.js} +8 -6
- package/{routeSourceValidator-e4jmbfcx.js → routeSourceValidator-7fycdqyv.js} +1 -1
- package/{scalar.command-51ryzypc.js → scalar.command-6krkz6tw.js} +9 -7
- package/templates/app/env/env.client.debug.ts.template +1 -5
- package/templates/app/env/env.client.develop.ts.template +1 -5
- package/templates/app/env/env.client.local.ts.template +1 -5
- package/templates/app/env/env.client.main.ts.template +1 -5
- package/templates/app/env/env.client.testing.ts.template +1 -5
- package/templates/app/env/env.client.type.ts +2 -6
- package/templates/app/env/env.server.debug.ts.template +1 -5
- package/templates/app/env/env.server.develop.ts.template +1 -5
- package/templates/app/env/env.server.local.ts.template +1 -5
- package/templates/app/env/env.server.main.ts.template +1 -5
- package/templates/app/main.ts +3 -1
- 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 -5
- 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 +6 -2
- package/templates/module/__Model__.Util.tsx +1 -1
- package/templates/module/__Model__.Zone.tsx +3 -5
- package/templates/workspaceRoot/AGENTS.md.template +4 -972
- package/templates/workspaceRoot/CLAUDE.md.template +19 -0
- package/templates/workspaceRoot/biome.json.template +4 -244
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +10 -14
- package/templates/workspaceRoot/docs/GENERATED.md.template +12 -10
- package/templates/workspaceRoot/package.json.template +1 -1
- package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/{workflow.command-91wmvm8k.js → workflow.command-dwhwrqhd.js} +16 -14
- package/{workspace.command-wa10mfd9.js → workspace.command-f5h11gjn.js} +71 -52
- package/templates/workspaceRoot/.cursor/rules/akan-page-routing.mdc.template +0 -43
- package/templates/workspaceRoot/.cursor/rules/akan-sync-conventions.mdc.template +0 -34
- 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 -19
- package/templates/workspaceRoot/.cursor/rules/module-file-playbook.mdc.template +0 -62
- 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 -99
- 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
|
@@ -422,7 +422,7 @@ class HmrWatcher {
|
|
|
422
422
|
this.#unreportedChanges += unreported;
|
|
423
423
|
if (!this.#reportedCompensating) {
|
|
424
424
|
this.#reportedCompensating = true;
|
|
425
|
-
this.#logger.
|
|
425
|
+
this.#logger.verbose(`[hmr] recovered ${unreported} change(s) that fs.watch did not report; Bun coalesces concurrent saves and drops all but one, so changes are resolved by mtime`);
|
|
426
426
|
}
|
|
427
427
|
this.#logger.verbose(`[hmr] mtime scan found ${unreported} change(s) fs.watch never reported (${this.#unreportedChanges} total)`);
|
|
428
428
|
}
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
workflowRunArtifactPath,
|
|
4
4
|
workflowSyncDir
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-8besc14m.js";
|
|
6
6
|
import {
|
|
7
7
|
AppExecutor,
|
|
8
8
|
LibExecutor,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
extractBlockVersion,
|
|
10
|
+
isScannedRootEntry,
|
|
11
|
+
readDevkitVersion,
|
|
12
|
+
rootAllowedDirs,
|
|
13
|
+
rootAllowedFiles
|
|
14
|
+
} from "./index-5f4gnt4c.js";
|
|
13
15
|
import {
|
|
14
16
|
collectRecipeSources,
|
|
15
17
|
findInlineRecipeDuplicates,
|
|
@@ -124,7 +126,9 @@ var validationCommands = [
|
|
|
124
126
|
"akan typecheck <app-name>",
|
|
125
127
|
"akan test <app-or-lib-or-pkg>",
|
|
126
128
|
"akan build <app-name>",
|
|
127
|
-
"akan doctor --strict --format json"
|
|
129
|
+
"akan doctor --strict --format json",
|
|
130
|
+
"akan quality scan [--format json]",
|
|
131
|
+
"akan quality ssr [--format json]"
|
|
128
132
|
];
|
|
129
133
|
var unknownGeneratedFilesFreshness = {
|
|
130
134
|
status: "unknown",
|
|
@@ -365,6 +369,29 @@ class AkanContextAnalyzer {
|
|
|
365
369
|
validationCommands
|
|
366
370
|
};
|
|
367
371
|
}
|
|
372
|
+
static async#agentGuideDrift(workspace) {
|
|
373
|
+
const installed = await readDevkitVersion();
|
|
374
|
+
if (!installed)
|
|
375
|
+
return null;
|
|
376
|
+
const content = await safeReadText(path.join(workspace.workspaceRoot, "AGENTS.md"));
|
|
377
|
+
if (content === null)
|
|
378
|
+
return null;
|
|
379
|
+
const stamped = extractBlockVersion(content);
|
|
380
|
+
if (stamped === installed)
|
|
381
|
+
return null;
|
|
382
|
+
const hint = "Re-render the AGENTS.md managed block from the installed framework release.";
|
|
383
|
+
if (!stamped)
|
|
384
|
+
return {
|
|
385
|
+
code: "agent-guide-unstamped",
|
|
386
|
+
message: `AGENTS.md carries no generated-version stamp, so its conventions may predate @akanjs/devkit ${installed}`,
|
|
387
|
+
hint
|
|
388
|
+
};
|
|
389
|
+
return {
|
|
390
|
+
code: "agent-guide-stale",
|
|
391
|
+
message: `AGENTS.md was generated by @akanjs/devkit ${stamped}, but ${installed} is installed`,
|
|
392
|
+
hint
|
|
393
|
+
};
|
|
394
|
+
}
|
|
368
395
|
static async doctor(workspace, {
|
|
369
396
|
strict = false,
|
|
370
397
|
runIdOrPlan = null,
|
|
@@ -377,25 +404,37 @@ class AkanContextAnalyzer {
|
|
|
377
404
|
repairAction("generated", "akan repair generated --app <app-or-lib>", "Refresh generated Akan files.", true),
|
|
378
405
|
repairAction("format", "akan repair format --target <app-or-lib-or-pkg>", "Run the formatter/linter repair path.", true)
|
|
379
406
|
];
|
|
380
|
-
for (const
|
|
381
|
-
const
|
|
382
|
-
for (const entry of await safeReadDir(
|
|
383
|
-
if (!
|
|
407
|
+
for (const sys of [...context.apps, ...context.libs]) {
|
|
408
|
+
const sysPath = path.join(workspace.workspaceRoot, sys.path);
|
|
409
|
+
for (const entry of await safeReadDir(sysPath)) {
|
|
410
|
+
if (!isScannedRootEntry(sys.type, entry.name))
|
|
384
411
|
continue;
|
|
385
|
-
const allowed = entry.isDirectory() ?
|
|
412
|
+
const allowed = entry.isDirectory() ? rootAllowedDirs[sys.type].has(entry.name) : rootAllowedFiles[sys.type].has(entry.name);
|
|
386
413
|
if (!allowed) {
|
|
387
|
-
const action = repairAction("module-shape", `akan repair module-shape --app ${
|
|
414
|
+
const action = repairAction("module-shape", `akan repair module-shape --app ${sys.name}`, `Review ${sys.type} root shape and remove or move the unknown entry.`, false);
|
|
388
415
|
diagnostics.push({
|
|
389
416
|
severity: "error",
|
|
390
|
-
code:
|
|
391
|
-
path: `${
|
|
392
|
-
message: `Unexpected ${entry.isDirectory() ? "folder" : "file"} in
|
|
417
|
+
code: `${sys.type}-root-unknown-entry`,
|
|
418
|
+
path: `${sys.path}/${entry.name}`,
|
|
419
|
+
message: `Unexpected ${entry.isDirectory() ? "folder" : "file"} in ${sys.type} root: ${sys.path}/${entry.name}`,
|
|
393
420
|
repairActions: [action]
|
|
394
421
|
});
|
|
395
422
|
repairActions.push(action);
|
|
396
423
|
}
|
|
397
424
|
}
|
|
398
425
|
}
|
|
426
|
+
const agentDrift = await AkanContextAnalyzer.#agentGuideDrift(workspace);
|
|
427
|
+
if (agentDrift) {
|
|
428
|
+
const action = repairAction("generated", "akan agent install agents-md", agentDrift.hint, true);
|
|
429
|
+
diagnostics.push({
|
|
430
|
+
severity: "warning",
|
|
431
|
+
code: agentDrift.code,
|
|
432
|
+
path: "AGENTS.md",
|
|
433
|
+
message: agentDrift.message,
|
|
434
|
+
repairActions: [action]
|
|
435
|
+
});
|
|
436
|
+
repairActions.push(action);
|
|
437
|
+
}
|
|
399
438
|
for (const sys of [...context.apps, ...context.libs]) {
|
|
400
439
|
for (const module of sys.modules) {
|
|
401
440
|
if (!module.abstract.exists) {
|
|
@@ -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-cp00yns2.js";
|
|
11
11
|
import {
|
|
12
12
|
runner
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-gvq17wqn.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-5f4gnt4c.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
|
|
|
@@ -285,7 +283,10 @@ ${chalk.green("\u27A4")} Authentication Required`));
|
|
|
285
283
|
return;
|
|
286
284
|
}
|
|
287
285
|
}
|
|
288
|
-
|
|
286
|
+
Logger.info("Logging in to npm...");
|
|
287
|
+
await workspace.spawn("npm", ["login"], { stdio: "inherit" });
|
|
288
|
+
Logger.info("Logged in to npm");
|
|
289
|
+
for (const library of akanPkgs) {
|
|
289
290
|
Logger.info(`Publishing ${library}@${nextVersion} to ${registry ?? "npm"}...`);
|
|
290
291
|
await workspace.spawn("npm", ["publish", "--tag", tag, ...this.#getRegistryArgs(registry), ...this.#getLocalRegistryAuthArgs(registry)], {
|
|
291
292
|
cwd: path.join(workspace.workspaceRoot, "dist/pkgs", library),
|
|
@@ -293,7 +294,7 @@ ${chalk.green("\u27A4")} Authentication Required`));
|
|
|
293
294
|
stdio: "inherit"
|
|
294
295
|
});
|
|
295
296
|
Logger.info(`${library}@${nextVersion} is published to ${registry ?? "npm"}`);
|
|
296
|
-
}
|
|
297
|
+
}
|
|
297
298
|
Logger.info(`All libraries are published to ${registry ?? "npm"}`);
|
|
298
299
|
}
|
|
299
300
|
async update(workspace, tag = "latest", { registryUrl } = {}) {
|