@akanjs/cli 3.2.0-rc.1 → 3.2.0-rc.2

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.
Files changed (76) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-vmd9k4ak.js → CodeAgent-6cpjtj25.js} +2 -2
  3. package/{CodeTui-zka44v52.js → CodeTui-zyc7zaq6.js} +1 -1
  4. package/TunnelShare-zkfkrw8w.js +14 -0
  5. package/{agent.command-2f657613.js → agent.command-kf1g3nh4.js} +17 -17
  6. package/akanCode.js +2 -2
  7. package/{application.command-q6skd3am.js → application.command-vb278qnq.js} +12 -12
  8. package/{applicationBuildRunner-sctcmkyx.js → applicationBuildRunner-bqbyeg84.js} +6 -6
  9. package/buildBatch.proc.js +6 -6
  10. package/{cloud.command-7642pks6.js → cloud.command-ca777ee2.js} +18 -18
  11. package/cloud.script-agpxzq6j.js +30 -0
  12. package/{code.command-7s4ndq2k.js → code.command-j08txqcd.js} +6 -6
  13. package/{context.command-569z0rqf.js → context.command-2fa6egp9.js} +19 -19
  14. package/context.runner-ftv8373t.js +29 -0
  15. package/{guideline.command-gnv3e8p8.js → guideline.command-w6yqpdec.js} +2 -2
  16. package/incrementalBuilder.proc.js +7 -7
  17. package/{index-a8a9ede9.js → index-0fj9ra3q.js} +3 -3
  18. package/{index-thckcabc.js → index-0mqga3h9.js} +18 -3
  19. package/{index-abgh0jve.js → index-1cb9apzn.js} +1 -1
  20. package/{index-ed6ea0qp.js → index-20wvskt8.js} +1 -1
  21. package/{index-5w9my9qe.js → index-2gees180.js} +8 -8
  22. package/{index-93ewzmp6.js → index-386canwe.js} +21 -14
  23. package/{index-fjr4d6yd.js → index-466z5931.js} +5 -5
  24. package/{index-d4n1wmrz.js → index-65b6ms4c.js} +4 -4
  25. package/{index-6wpaq392.js → index-6h775rv3.js} +4 -4
  26. package/{index-aj3ehkcx.js → index-7kmbqp0b.js} +1 -1
  27. package/{index-1q1cjn8s.js → index-84c2pgak.js} +93 -53
  28. package/{index-sy481q2x.js → index-8jpc5fqv.js} +1 -1
  29. package/{index-vr68mxj5.js → index-8nbx607g.js} +8 -8
  30. package/{index-8kczhnmv.js → index-abfbf01s.js} +1 -1
  31. package/{index-v4p1zye8.js → index-annxfpgz.js} +7 -7
  32. package/{index-8g7tdsk4.js → index-bdmgqzb5.js} +4 -4
  33. package/{index-vkzfk7qt.js → index-c5ymqb05.js} +40 -30
  34. package/{index-0fb3cpbt.js → index-cbcwxp5v.js} +5 -5
  35. package/{index-zpv14wpy.js → index-djc5nxpy.js} +3 -3
  36. package/{index-s2grpzef.js → index-dk4g0x0d.js} +3 -3
  37. package/{index-drz9e84d.js → index-e22zedc2.js} +2 -2
  38. package/{index-w639tvkd.js → index-ebwkh7bt.js} +7 -4
  39. package/{index-8ts9774g.js → index-htxck0pn.js} +4 -4
  40. package/{index-9tbgb4d8.js → index-j1hjb477.js} +1 -1
  41. package/{index-kpdv34rq.js → index-j7p0jgaq.js} +10 -7
  42. package/{index-ktb3wcqz.js → index-kcpk2d20.js} +8 -8
  43. package/{index-7y5yghjg.js → index-m5sg5spm.js} +932 -431
  44. package/{index-rc5fvqj2.js → index-mvwvxgtd.js} +28 -26
  45. package/{index-e3vmjtph.js → index-pq5rjkch.js} +2 -2
  46. package/{index-48d5qsj3.js → index-qgazn58x.js} +4 -4
  47. package/{index-eajbmk10.js → index-v50xjbbe.js} +1 -1
  48. package/{index-7xdpww43.js → index-vbhx60x5.js} +323 -129
  49. package/{index-sr5da35e.js → index-wfmpxke3.js} +2 -2
  50. package/{index-mmym5xmb.js → index-wr9magsr.js} +5 -3
  51. package/{index-mqntfzv5.js → index-xa0289eg.js} +2 -2
  52. package/{index-8pb9yvp8.js → index-xq97me1h.js} +49 -12
  53. package/{index-p6hjwt2d.js → index-y725zb1a.js} +1 -1
  54. package/{index-hqrkqxx2.js → index-ygrdw6jw.js} +1 -1
  55. package/index.js +23 -23
  56. package/{library.command-1gp5qe3r.js → library.command-8d03a0pq.js} +4 -4
  57. package/{localRegistry.command-x7jptkd3.js → localRegistry.command-vyv5k6t0.js} +17 -17
  58. package/{module.command-4xz9he6h.js → module.command-vy3kg965.js} +7 -7
  59. package/{package.command-s7qpnn1g.js → package.command-qjh13rs9.js} +7 -7
  60. package/package.json +2 -2
  61. package/{page.command-fan34c49.js → page.command-t0nx1jat.js} +3 -3
  62. package/{pipeline.command-ph4fnn9w.js → pipeline.command-2yjeas7m.js} +2 -2
  63. package/{primitive.command-3fqh8emf.js → primitive.command-8vm49279.js} +7 -7
  64. package/{projectTypecheck-vkb40hjc.js → projectTypecheck-s9hhe5sa.js} +1 -1
  65. package/{quality.command-ecj6exsh.js → quality.command-v76fev72.js} +6 -6
  66. package/{repair.command-fe9jw719.js → repair.command-fp4m3w03.js} +6 -6
  67. package/{scalar.command-cnvfhk0n.js → scalar.command-hxe6try8.js} +6 -6
  68. package/skills/akan-scaffold/SKILL.md +2 -1
  69. package/{subspace.command-qw5ddd6y.js → subspace.command-q42n1844.js} +8 -8
  70. package/{tunnel.command-ggj38mqf.js → tunnel.command-22g11n0x.js} +7 -7
  71. package/{verify.command-w9ttxkdz.js → verify.command-rx43bha1.js} +14 -14
  72. package/{workflow.command-ss8devj0.js → workflow.command-yg0d8mmq.js} +30 -15
  73. package/{workspace.command-6z2rh8ze.js → workspace.command-fcfztvn5.js} +33 -33
  74. package/TunnelShare-k3ja4w9x.js +0 -14
  75. package/cloud.script-1sfseznn.js +0 -30
  76. package/context.runner-ms8v1rxy.js +0 -29
@@ -1375,8 +1375,8 @@ class StoreBootstrap {
1375
1375
  const runtime = exports.get("usePage");
1376
1376
  const store = exports.get("st");
1377
1377
  if (!runtime || runtime.namespace || !store || store.namespace)
1378
- return StoreBootstrap.#lines([specifier]);
1379
- return StoreBootstrap.#lines([...new Set([runtime.subpath, store.subpath])]);
1378
+ return [specifier];
1379
+ return [...new Set([runtime.subpath, store.subpath])];
1380
1380
  }
1381
1381
  static #lines(specifiers) {
1382
1382
  return specifiers.map((specifier) => `import ${JSON.stringify(specifier)};`);
@@ -1,15 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-sr5da35e.js";
4
+ } from "./index-wfmpxke3.js";
5
5
  import {
6
6
  createBarrelImportsPlugin,
7
+ workspaceBarrels,
7
8
  bundleConditions,
8
9
  bundleDefine,
9
10
  CsrEntryFiles,
10
11
  PagesEntrySourceGenerator,
11
12
  PagesBundleBuilder
12
- } from "./index-1q1cjn8s.js";
13
+ } from "./index-84c2pgak.js";
13
14
 
14
15
  // pkgs/@akanjs/devkit/frontendBuild/csrArtifactBuilder.ts
15
16
  import { mkdir as mkdir2, rm as rm2, unlink as unlink2 } from "fs/promises";
@@ -462,7 +463,8 @@ ${logs}` : ""}`);
462
463
  };
463
464
  }
464
465
  static async barrelImportsPlugin(app, pipeAfter) {
465
- return await createBarrelImportsPlugin(app, { barrels: ["akanjs/ui"], pipeAfter });
466
+ const barrels = ["akanjs/ui", ...workspaceBarrels((await app.getConfig()).barrelImports)];
467
+ return await createBarrelImportsPlugin(app, { barrels, pipeAfter });
466
468
  }
467
469
  static publicEnvPath(app) {
468
470
  return path4.join(app.dist.cwdPath, ".akan", "artifact", "csr-public-env.json");
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-93ewzmp6.js";
5
+ } from "./index-386canwe.js";
6
6
  import {
7
7
  LibSource,
8
8
  formatLibStatuses,
9
9
  CommandExecutionError,
10
10
  LibExecutor
11
- } from "./index-sr5da35e.js";
11
+ } from "./index-wfmpxke3.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/library/library.script.ts
14
14
  import { Logger } from "akanjs/common";
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  AppExecutor,
4
4
  LibExecutor
5
- } from "./index-sr5da35e.js";
5
+ } from "./index-wfmpxke3.js";
6
6
  import {
7
7
  createAst,
8
8
  AkanIndex
9
- } from "./index-7y5yghjg.js";
9
+ } from "./index-m5sg5spm.js";
10
10
  import {
11
11
  camelToKebabCase
12
- } from "./index-93ewzmp6.js";
12
+ } from "./index-386canwe.js";
13
13
 
14
14
  // pkgs/@akanjs/devkit/workflow/artifacts.ts
15
15
  import { capitalize as capitalize2 } from "akanjs/common";
@@ -216,6 +216,7 @@ var createWorkflowApplyReport = ({
216
216
  plan
217
217
  };
218
218
  };
219
+ var withoutApplyHints = (recommendations) => recommendations.filter((recommendation) => recommendation.kind !== "auto-apply" && recommendation.kind !== "validation");
219
220
  var resolveWorkflowCommand = (command, plan) => {
220
221
  const target = typeof plan.inputs.app === "string" ? plan.inputs.app : "<app-or-lib>";
221
222
  return command.replaceAll("<app-or-lib-or-pkg>", target).replaceAll("<app-or-lib>", target).replaceAll("<app-name>", target);
@@ -455,6 +456,17 @@ var createWorkflowValidationRunReport = async ({
455
456
  };
456
457
  };
457
458
  var createDryRunWorkflowApplyReport = (plan) => {
459
+ if (workflowStatus(plan.diagnostics) === "failed")
460
+ return createWorkflowApplyReport({
461
+ workflow: plan.workflow,
462
+ mode: "dry-run",
463
+ changedFiles: [],
464
+ generatedFiles: [],
465
+ diagnostics: [...plan.diagnostics],
466
+ recommendations: withoutApplyHints(plan.recommendations),
467
+ nextActions: [],
468
+ plan
469
+ });
458
470
  const changedFiles = plan.predictedChanges.flatMap((change) => {
459
471
  if (change.action !== "create" && change.action !== "modify")
460
472
  return [];
@@ -3397,25 +3409,44 @@ var inspectRenameKeyPlan = async (workspace, plan) => {
3397
3409
  var syssHolding = async (workspace, module, except) => {
3398
3410
  const [apps, libs] = await workspace.getSyss();
3399
3411
  const others = await Promise.all([...apps, ...libs].filter((name) => name !== except.name).map(async (name) => await resolveWorkflowSys(workspace, name)));
3400
- const holding = await Promise.all(others.map(async (other) => other && (await other.readdir("lib")).includes(module) ? other : null));
3412
+ const holding = await Promise.all(others.map(async (other) => other && (await other.getDatabaseModules()).includes(module) ? other : null));
3401
3413
  return holding.filter((other) => other !== null);
3402
3414
  };
3403
3415
  var moduleMissing = async (workspace, sys, module) => {
3404
3416
  if ((await sys.readdir("lib")).includes(module))
3405
3417
  return null;
3406
3418
  const root = getSysRoot(sys);
3407
- const modules = [...await sys.getDatabaseModules(), ...await sys.getServiceModules()];
3408
- const sameName = modules.find((name) => name.replace(/^_/, "").toLowerCase() === module.toLowerCase());
3419
+ const modules = await sys.getDatabaseModules();
3420
+ const sameName = modules.find((name) => name.toLowerCase() === module.toLowerCase());
3421
+ const service = (await sys.getServiceModules()).find((name) => name.replace(/^_/, "").toLowerCase() === module.replace(/^_/, "").toLowerCase());
3409
3422
  const isScalar = (await sys.getScalarModules()).includes(module);
3410
- const [holder] = sameName || isScalar ? [] : await syssHolding(workspace, module, sys);
3423
+ const [holder] = sameName || service || isScalar ? [] : await syssHolding(workspace, module, sys);
3411
3424
  return {
3412
3425
  severity: "error",
3413
3426
  code: "workflow-module-missing",
3414
3427
  input: "module",
3415
3428
  message: [
3416
3429
  `No module named ${module} in ${root}: ${root}/lib/${module} does not exist.`,
3417
- modules.length ? `Its modules are ${modules.join(", ")}.` : `${root} has no modules yet.`,
3418
- sameName ? `Did you mean ${sameName}?` : isScalar ? `${root}/lib/__scalar/${module} is a scalar, and this workflow writes only into a module under ${root}/lib.` : holder ? `${module} is in ${getSysRoot(holder)}, so plan this with --app ${holder.name}.` : `If ${module} is a new model, create it with the create-module workflow first, then plan this again.`
3430
+ modules.length ? `Its database modules are ${modules.join(", ")}.` : `${root} has no database modules yet.`,
3431
+ sameName ? `Did you mean ${sameName}?` : service ? `${root}/lib/${service} is a service module, which stores no model, and this workflow writes only into a database module.` : isScalar ? `${root}/lib/__scalar/${module} is a scalar, and this workflow writes only into a module under ${root}/lib.` : holder ? `${module} is in ${getSysRoot(holder)}, so plan this with --app ${holder.name}.` : `If ${module} is a new model, create it with the create-module workflow first, then plan this again.`
3432
+ ].join(" ")
3433
+ };
3434
+ };
3435
+ var moduleNotDatabase = async (sys, spec, module) => {
3436
+ const databaseModules = await sys.getDatabaseModules();
3437
+ if (databaseModules.includes(module))
3438
+ return null;
3439
+ const root = getSysRoot(sys);
3440
+ const isServiceModule = module.startsWith("_") && !module.startsWith("__");
3441
+ return {
3442
+ severity: "error",
3443
+ code: "workflow-module-not-database",
3444
+ input: "module",
3445
+ message: [
3446
+ isServiceModule ? `${module} in ${root} is a service module, which stores no model.` : `${root}/lib/${module} is not a database module: it has no ${module}.constant.ts.`,
3447
+ `${spec.name} needs a database module, one with lib/<model>/<model>.constant.ts.`,
3448
+ databaseModules.length ? `Its database modules are ${databaseModules.join(", ")}.` : `${root} has no database modules yet.`,
3449
+ spec.inputs.field ? "Add the field to one of them, or create its model with the create-module workflow first; a value several models embed is a scalar, made with create-scalar and added to a model as a field of that type." : "Plan this on one of them, or create the model with the create-module workflow first."
3419
3450
  ].join(" ")
3420
3451
  };
3421
3452
  };
@@ -3439,10 +3470,10 @@ var workflowTargetDiagnostics = async (workspace, spec, inputs) => {
3439
3470
  const moduleSpec = spec.inputs.module;
3440
3471
  if (!module || !moduleSpec?.mustExist)
3441
3472
  return [];
3442
- const missing = await moduleMissing(workspace, sys, module);
3443
- return missing ? [missing] : [];
3473
+ const refused = await moduleMissing(workspace, sys, module) ?? await moduleNotDatabase(sys, spec, module);
3474
+ return refused ? [refused] : [];
3444
3475
  };
3445
- var inspectWorkflowPlan = async (workspace, spec, plan) => {
3476
+ var inspectPlanTarget = async (workspace, spec, plan) => {
3446
3477
  const targetDiagnostics = await workflowTargetDiagnostics(workspace, spec, plan.inputs);
3447
3478
  if (targetDiagnostics.length)
3448
3479
  return {
@@ -3475,6 +3506,12 @@ var inspectWorkflowPlan = async (workspace, spec, plan) => {
3475
3506
  recommendations: [...plan.recommendations, ...inspected.recommendations]
3476
3507
  };
3477
3508
  };
3509
+ var inspectWorkflowPlan = async (workspace, spec, plan) => {
3510
+ const inspected = await inspectPlanTarget(workspace, spec, plan);
3511
+ if (workflowStatus(inspected.diagnostics) === "passed")
3512
+ return inspected;
3513
+ return { ...inspected, recommendations: withoutApplyHints(inspected.recommendations) };
3514
+ };
3478
3515
  // pkgs/@akanjs/devkit/workflow/render.ts
3479
3516
  var listOr = (items, render, empty = "- none") => items?.length ? items.map(render) : [empty];
3480
3517
  var renderDiagnostic = (diagnostic) => `- [${diagnostic.severity}] ${diagnostic.code}: ${diagnostic.message}`;
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  JsonFormatter
4
- } from "./index-sr5da35e.js";
4
+ } from "./index-wfmpxke3.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/applicationBuildReporter.ts
7
7
  import { realpathSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  JsonFormatter
4
- } from "./index-sr5da35e.js";
4
+ } from "./index-wfmpxke3.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/maintainabilityBaseline.ts
7
7
  class MaintainabilityBaseline {
package/index.js CHANGED
@@ -4,9 +4,9 @@ import {
4
4
  getTargetMetas,
5
5
  getTargetCommandNames,
6
6
  runCommands
7
- } from "./index-93ewzmp6.js";
7
+ } from "./index-386canwe.js";
8
8
  import"./index-bns3wcpc.js";
9
- import"./index-sr5da35e.js";
9
+ import"./index-wfmpxke3.js";
10
10
 
11
11
  // pkgs/@akanjs/cli/bunVersionGuard.ts
12
12
  class BunVersionGuard {
@@ -22,27 +22,27 @@ import path from "path";
22
22
 
23
23
  // pkgs/@akanjs/cli/commandModules.ts
24
24
  var commandModules = {
25
- workspace: async () => (await import("./workspace.command-6z2rh8ze.js")).WorkspaceCommand,
26
- agent: async () => (await import("./agent.command-2f657613.js")).AgentCommand,
27
- code: async () => (await import("./code.command-7s4ndq2k.js")).CodeCommand,
28
- application: async () => (await import("./application.command-q6skd3am.js")).ApplicationCommand,
29
- library: async () => (await import("./library.command-1gp5qe3r.js")).LibraryCommand,
30
- localRegistry: async () => (await import("./localRegistry.command-x7jptkd3.js")).LocalRegistryCommand,
31
- package: async () => (await import("./package.command-s7qpnn1g.js")).PackageCommand,
32
- module: async () => (await import("./module.command-4xz9he6h.js")).ModuleCommand,
33
- page: async () => (await import("./page.command-fan34c49.js")).PageCommand,
34
- context: async () => (await import("./context.command-569z0rqf.js")).ContextCommand,
35
- cloud: async () => (await import("./cloud.command-7642pks6.js")).CloudCommand,
36
- subspace: async () => (await import("./subspace.command-qw5ddd6y.js")).SubspaceCommand,
37
- guideline: async () => (await import("./guideline.command-gnv3e8p8.js")).GuidelineCommand,
38
- scalar: async () => (await import("./scalar.command-cnvfhk0n.js")).ScalarCommand,
39
- primitive: async () => (await import("./primitive.command-3fqh8emf.js")).PrimitiveCommand,
40
- quality: async () => (await import("./quality.command-ecj6exsh.js")).QualityCommand,
41
- verify: async () => (await import("./verify.command-w9ttxkdz.js")).VerifyCommand,
42
- repair: async () => (await import("./repair.command-fe9jw719.js")).RepairCommand,
43
- workflow: async () => (await import("./workflow.command-ss8devj0.js")).WorkflowCommand,
44
- pipeline: async () => (await import("./pipeline.command-ph4fnn9w.js")).PipelineCommand,
45
- tunnel: async () => (await import("./tunnel.command-ggj38mqf.js")).TunnelCommand
25
+ workspace: async () => (await import("./workspace.command-fcfztvn5.js")).WorkspaceCommand,
26
+ agent: async () => (await import("./agent.command-kf1g3nh4.js")).AgentCommand,
27
+ code: async () => (await import("./code.command-j08txqcd.js")).CodeCommand,
28
+ application: async () => (await import("./application.command-vb278qnq.js")).ApplicationCommand,
29
+ library: async () => (await import("./library.command-8d03a0pq.js")).LibraryCommand,
30
+ localRegistry: async () => (await import("./localRegistry.command-vyv5k6t0.js")).LocalRegistryCommand,
31
+ package: async () => (await import("./package.command-qjh13rs9.js")).PackageCommand,
32
+ module: async () => (await import("./module.command-vy3kg965.js")).ModuleCommand,
33
+ page: async () => (await import("./page.command-t0nx1jat.js")).PageCommand,
34
+ context: async () => (await import("./context.command-2fa6egp9.js")).ContextCommand,
35
+ cloud: async () => (await import("./cloud.command-ca777ee2.js")).CloudCommand,
36
+ subspace: async () => (await import("./subspace.command-q42n1844.js")).SubspaceCommand,
37
+ guideline: async () => (await import("./guideline.command-w6yqpdec.js")).GuidelineCommand,
38
+ scalar: async () => (await import("./scalar.command-hxe6try8.js")).ScalarCommand,
39
+ primitive: async () => (await import("./primitive.command-8vm49279.js")).PrimitiveCommand,
40
+ quality: async () => (await import("./quality.command-v76fev72.js")).QualityCommand,
41
+ verify: async () => (await import("./verify.command-rx43bha1.js")).VerifyCommand,
42
+ repair: async () => (await import("./repair.command-fp4m3w03.js")).RepairCommand,
43
+ workflow: async () => (await import("./workflow.command-yg0d8mmq.js")).WorkflowCommand,
44
+ pipeline: async () => (await import("./pipeline.command-2yjeas7m.js")).PipelineCommand,
45
+ tunnel: async () => (await import("./tunnel.command-22g11n0x.js")).TunnelCommand
46
46
  };
47
47
  var commandModuleIds = Object.keys(commandModules);
48
48
 
@@ -3,19 +3,19 @@ import {
3
3
  Lib,
4
4
  Workspace,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-386canwe.js";
7
7
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
8
+ import"./index-wfmpxke3.js";
9
9
  import {
10
10
  LibraryScript
11
- } from "./index-mqntfzv5.js";
11
+ } from "./index-xa0289eg.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/library/library.command.ts
14
14
  class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
15
15
  createLibrary: target({ desc: "Create a new shared library in the workspace" }).arg("libName", String, { desc: "name of library" }).with(Workspace).exec(async function(libName, workspace) {
16
16
  await this.libraryScript.createLibrary(libName.toLowerCase().replace(/ /g, "-"), workspace);
17
17
  }),
18
- removeLibrary: target({ desc: "Remove a library from the workspace" }).with(Lib).exec(async function(lib) {
18
+ removeLibrary: target({ desc: "Remove a library from the workspace", destructive: true }).with(Lib).exec(async function(lib) {
19
19
  await this.libraryScript.removeLibrary(lib);
20
20
  }),
21
21
  syncLibrary: target({ desc: "Sync dependencies and configuration for a library" }).with(Lib).exec(async function(lib) {
@@ -4,41 +4,41 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-93ewzmp6.js";
7
+ } from "./index-386canwe.js";
8
8
  import"./index-bns3wcpc.js";
9
9
  import {
10
10
  parseEnvFile,
11
11
  PkgExecutor
12
- } from "./index-sr5da35e.js";
12
+ } from "./index-wfmpxke3.js";
13
13
  import {
14
14
  npmRegistryFromEnv,
15
15
  warnIgnoredNpmRegistry,
16
16
  getNpmRegistryUrl
17
17
  } from "./index-ny2k80mv.js";
18
- import"./index-p6hjwt2d.js";
19
- import"./index-zpv14wpy.js";
20
- import"./index-ed6ea0qp.js";
18
+ import"./index-y725zb1a.js";
19
+ import"./index-djc5nxpy.js";
20
+ import"./index-20wvskt8.js";
21
21
  import"./index-m9jj544v.js";
22
- import"./index-1q1cjn8s.js";
23
- import"./index-mmym5xmb.js";
24
- import"./index-mqntfzv5.js";
25
- import"./index-ktb3wcqz.js";
22
+ import"./index-84c2pgak.js";
23
+ import"./index-wr9magsr.js";
24
+ import"./index-xa0289eg.js";
25
+ import"./index-kcpk2d20.js";
26
26
  import"./index-23860fej.js";
27
27
  import {
28
28
  ApplicationScript
29
- } from "./index-vr68mxj5.js";
30
- import"./index-drz9e84d.js";
29
+ } from "./index-8nbx607g.js";
30
+ import"./index-e22zedc2.js";
31
31
  import {
32
32
  CloudRunner
33
- } from "./index-6wpaq392.js";
33
+ } from "./index-6h775rv3.js";
34
34
  import"./index-qd7xn2bk.js";
35
- import"./index-7y5yghjg.js";
36
- import"./index-abgh0jve.js";
37
- import"./index-hqrkqxx2.js";
35
+ import"./index-m5sg5spm.js";
36
+ import"./index-1cb9apzn.js";
37
+ import"./index-ygrdw6jw.js";
38
38
  import {
39
39
  PackageScript
40
- } from "./index-d4n1wmrz.js";
41
- import"./index-sy481q2x.js";
40
+ } from "./index-65b6ms4c.js";
41
+ import"./index-8jpc5fqv.js";
42
42
  import"./index-9bv479q5.js";
43
43
 
44
44
  // pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
@@ -3,17 +3,17 @@ import {
3
3
  Sys,
4
4
  Module,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-386canwe.js";
7
7
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
8
+ import"./index-wfmpxke3.js";
9
9
  import {
10
10
  renderPrimitiveReport
11
- } from "./index-8pb9yvp8.js";
12
- import"./index-7y5yghjg.js";
13
- import"./index-aj3ehkcx.js";
11
+ } from "./index-xq97me1h.js";
12
+ import"./index-m5sg5spm.js";
13
+ import"./index-7kmbqp0b.js";
14
14
  import {
15
15
  ModuleScript
16
- } from "./index-8ts9774g.js";
16
+ } from "./index-htxck0pn.js";
17
17
 
18
18
  // pkgs/@akanjs/cli/module/module.command.ts
19
19
  import { Logger, lowerlize } from "akanjs/common";
@@ -23,7 +23,7 @@ class ModuleCommand extends command("module", [ModuleScript], ({ public: target
23
23
  const report = await this.moduleScript.createModuleTemplate(sys, name, { page });
24
24
  Logger.rawLog(renderPrimitiveReport(report, format));
25
25
  }),
26
- removeModule: target({ desc: "Remove a module from an app or library" }).with(Module).exec(async function(module) {
26
+ removeModule: target({ desc: "Remove a module from an app or library", destructive: true }).with(Module).exec(async function(module) {
27
27
  await this.moduleScript.removeModule(module);
28
28
  }),
29
29
  createService: target({ desc: "Create a service module without database files" }).arg("serviceName", String, { desc: "name of service module" }).with(Sys).option("format", String, { flag: "o", desc: "output format", default: "markdown", enum: ["markdown", "json"] }).exec(async function(serviceName, sys, format) {
@@ -3,16 +3,16 @@ import {
3
3
  Pkg,
4
4
  Workspace,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-386canwe.js";
7
7
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
8
+ import"./index-wfmpxke3.js";
9
9
  import"./index-qd7xn2bk.js";
10
- import"./index-7y5yghjg.js";
11
- import"./index-abgh0jve.js";
12
- import"./index-hqrkqxx2.js";
10
+ import"./index-m5sg5spm.js";
11
+ import"./index-1cb9apzn.js";
12
+ import"./index-ygrdw6jw.js";
13
13
  import {
14
14
  PackageScript
15
- } from "./index-d4n1wmrz.js";
15
+ } from "./index-65b6ms4c.js";
16
16
 
17
17
  // pkgs/@akanjs/cli/package/package.command.ts
18
18
  class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
@@ -22,7 +22,7 @@ class PackageCommand extends command("package", [PackageScript], ({ public: targ
22
22
  createPackage: target({ desc: "Create a new package in pkgs/<name>/" }).option("name", String, { desc: "name of package" }).with(Workspace).exec(async function(name, workspace) {
23
23
  await this.packageScript.createPackage(workspace, name.toLowerCase().replace(/ /g, "-"));
24
24
  }),
25
- removePackage: target({ desc: "Remove a package from the workspace" }).with(Pkg).exec(async function(pkg) {
25
+ removePackage: target({ desc: "Remove a package from the workspace", destructive: true }).with(Pkg).exec(async function(pkg) {
26
26
  await this.packageScript.removePackage(pkg);
27
27
  }),
28
28
  syncPackage: target({ desc: "Sync dependencies and configuration for a package" }).with(Pkg).exec(async function(pkg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.2.0-rc.1",
3
+ "version": "3.2.0-rc.2",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -39,7 +39,7 @@
39
39
  "@earendil-works/pi-tui": "1.3.0",
40
40
  "@inquirer/prompts": "^8.7.3",
41
41
  "@tailwindcss/node": "^4.3.3",
42
- "akanjs": "3.2.0-rc.1",
42
+ "akanjs": "3.2.0-rc.2",
43
43
  "chalk": "^6.0.1",
44
44
  "commander": "^15.0.0",
45
45
  "dayjs": "^1.11.23",
@@ -3,12 +3,12 @@ import {
3
3
  App,
4
4
  Module,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-386canwe.js";
7
7
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
8
+ import"./index-wfmpxke3.js";
9
9
  import {
10
10
  PageScript
11
- } from "./index-aj3ehkcx.js";
11
+ } from "./index-7kmbqp0b.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/page/page.command.ts
14
14
  class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
@@ -4,7 +4,7 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-93ewzmp6.js";
7
+ } from "./index-386canwe.js";
8
8
  import {
9
9
  FileSys2
10
10
  } from "./index-bns3wcpc.js";
@@ -12,7 +12,7 @@ import {
12
12
  AkanAppConfig,
13
13
  AkanWorkspaceConfig,
14
14
  AppExecutor
15
- } from "./index-sr5da35e.js";
15
+ } from "./index-wfmpxke3.js";
16
16
  import {
17
17
  resolveMobileTargets
18
18
  } from "./index-m9jj544v.js";
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-93ewzmp6.js";
5
+ } from "./index-386canwe.js";
6
6
  import"./index-bns3wcpc.js";
7
- import"./index-sr5da35e.js";
7
+ import"./index-wfmpxke3.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-8pb9yvp8.js";
11
- import"./index-7y5yghjg.js";
12
- import"./index-aj3ehkcx.js";
13
- import"./index-8ts9774g.js";
10
+ } from "./index-xq97me1h.js";
11
+ import"./index-m5sg5spm.js";
12
+ import"./index-7kmbqp0b.js";
13
+ import"./index-htxck0pn.js";
14
14
  import {
15
15
  PrimitiveScript
16
- } from "./index-48d5qsj3.js";
16
+ } from "./index-qgazn58x.js";
17
17
 
18
18
  // pkgs/@akanjs/cli/primitive/primitive.command.ts
19
19
  import { Logger } from "akanjs/common";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  ProjectTypecheck2
4
- } from "./index-sr5da35e.js";
4
+ } from "./index-wfmpxke3.js";
5
5
  export {
6
6
  ProjectTypecheck2 as ProjectTypecheck
7
7
  };
@@ -3,28 +3,28 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-386canwe.js";
7
7
  import"./index-bns3wcpc.js";
8
8
  import {
9
9
  AppExecutor,
10
10
  LibExecutor,
11
11
  PkgExecutor
12
- } from "./index-sr5da35e.js";
12
+ } from "./index-wfmpxke3.js";
13
13
  import {
14
14
  MaintainabilityBaseline
15
- } from "./index-hqrkqxx2.js";
15
+ } from "./index-ygrdw6jw.js";
16
16
  import {
17
17
  WorkspaceRunner,
18
18
  AkanQualityScanner,
19
19
  formatQualityScanResult,
20
20
  formatSsrScanResult
21
- } from "./index-fjr4d6yd.js";
22
- import"./index-7y5yghjg.js";
21
+ } from "./index-466z5931.js";
22
+ import"./index-m5sg5spm.js";
23
23
  import"./index-62md4dwy.js";
24
24
  import"./index-ygdbn9jn.js";
25
25
  import"./index-hj6w4ka1.js";
26
26
  import"./index-ny2k80mv.js";
27
- import"./index-eajbmk10.js";
27
+ import"./index-v50xjbbe.js";
28
28
 
29
29
  // pkgs/@akanjs/cli/quality/quality.script.ts
30
30
  import { Logger } from "akanjs/common";
@@ -3,16 +3,16 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-386canwe.js";
7
7
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
8
+ import"./index-wfmpxke3.js";
9
+ import"./index-0mqga3h9.js";
9
10
  import"./index-hj6w4ka1.js";
10
- import"./index-8pb9yvp8.js";
11
- import"./index-7y5yghjg.js";
12
- import"./index-thckcabc.js";
11
+ import"./index-xq97me1h.js";
12
+ import"./index-m5sg5spm.js";
13
13
  import {
14
14
  RepairRunner
15
- } from "./index-0fb3cpbt.js";
15
+ } from "./index-cbcwxp5v.js";
16
16
 
17
17
  // pkgs/@akanjs/cli/repair/repair.script.ts
18
18
  import { Logger } from "akanjs/common";
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  Sys,
4
4
  command
5
- } from "./index-93ewzmp6.js";
5
+ } from "./index-386canwe.js";
6
6
  import"./index-bns3wcpc.js";
7
- import"./index-sr5da35e.js";
7
+ import"./index-wfmpxke3.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-8pb9yvp8.js";
11
- import"./index-7y5yghjg.js";
10
+ } from "./index-xq97me1h.js";
11
+ import"./index-m5sg5spm.js";
12
12
  import {
13
13
  ScalarScript
14
- } from "./index-e3vmjtph.js";
14
+ } from "./index-pq5rjkch.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/scalar/scalar.command.ts
17
17
  import { Logger, lowerlize } from "akanjs/common";
@@ -21,7 +21,7 @@ class ScalarCommand extends command("scalar", [ScalarScript], ({ public: target
21
21
  const report = await this.scalarScript.createScalar(sys, name);
22
22
  Logger.rawLog(renderPrimitiveReport(report, format));
23
23
  }),
24
- removeScalar: target({ desc: "Remove a scalar type from an app or library" }).arg("scalarName", String, { desc: "name of scalar" }).with(Sys).exec(async function(scalarName, sys) {
24
+ removeScalar: target({ desc: "Remove a scalar type from an app or library", destructive: true }).arg("scalarName", String, { desc: "name of scalar" }).with(Sys).exec(async function(scalarName, sys) {
25
25
  await this.scalarScript.removeScalar(sys, scalarName);
26
26
  })
27
27
  })) {
@@ -37,7 +37,8 @@ Then pick the workflow that matches the intent:
37
37
 
38
38
  ## The chain
39
39
 
40
- Each result names the next call in `next.tool`. Follow it; do not improvise.
40
+ Each result names the next call in `next.tool`. Follow it; do not improvise. A result with an error diagnostic, or
41
+ an apply that failed, names none: do what the diagnostic says, then plan again.
41
42
 
42
43
  1. `plan_workflow({ workflow: "create-module", inputs: { app: "<app>", module: "comment" } })` — read-only.
43
44
  Returns `planPath` and `next.tool=apply_workflow`. (`list_workflows` / `explain_workflow` give the names