nodefony 10.0.0-beta.9 → 10.0.1

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 (155) hide show
  1. package/.ai/symbols.json +113 -30
  2. package/CHANGELOG.md +40 -0
  3. package/README.md +8 -15
  4. package/assets/login.css +26 -1
  5. package/dist/bin/nodefony.js +1 -1
  6. package/dist/client/client/angular/index.js +1 -1
  7. package/dist/client/client/debugbar/DebugBar.js +2 -2
  8. package/dist/client/client/react/index.js +1 -1
  9. package/dist/client/client/sse/NodefonySse.js +1 -1
  10. package/dist/client/client/svelte/index.js +1 -1
  11. package/dist/client/client/vue/index.js +1 -1
  12. package/dist/client/debugbar.standalone.js +3 -3
  13. package/dist/client/realtime/base64url.js +1 -1
  14. package/dist/client/realtime/codec/decode.js +1 -1
  15. package/dist/client/realtime/codec/encode.js +3 -4
  16. package/dist/client/realtime/throughputProbe.js +1 -1
  17. package/dist/login/login.css +26 -1
  18. package/dist/node/Cli.js +6 -6
  19. package/dist/node/Error.js +3 -3
  20. package/dist/node/Event.js +1 -1
  21. package/dist/node/FileClass.js +3 -3
  22. package/dist/node/Nodefony.js +1 -1
  23. package/dist/node/bundler/index.js +1 -1
  24. package/dist/node/cli/agentTargets.js +2 -2
  25. package/dist/node/cli/aiMcp.js +2 -2
  26. package/dist/node/cli/aiSync.js +2 -2
  27. package/dist/node/cli/card.js +2 -2
  28. package/dist/node/cli/cliFreshness.js +1 -1
  29. package/dist/node/cli/completion.js +4 -4
  30. package/dist/node/cli/contributions.js +5 -6
  31. package/dist/node/cli/create.js +34 -15
  32. package/dist/node/cli/env.js +4 -4
  33. package/dist/node/cli/gitHooks.js +3 -3
  34. package/dist/node/cli/image/index.js +1 -1
  35. package/dist/node/cli/image/tarLayers.js +1 -1
  36. package/dist/node/cli/installCommand.js +28 -4
  37. package/dist/node/cli/installedPackages.js +2 -2
  38. package/dist/node/cli/licenses.js +3 -3
  39. package/dist/node/cli/man.js +2 -2
  40. package/dist/node/cli/manPage.js +1 -1
  41. package/dist/node/cli/outdated.js +1 -1
  42. package/dist/node/cli/progress.js +1 -1
  43. package/dist/node/cli/projectRoot.js +1 -1
  44. package/dist/node/cli/prompts.js +1 -1
  45. package/dist/node/cli/scaffold/engine.js +138 -30
  46. package/dist/node/cli/scaffold/format.js +1 -1
  47. package/dist/node/cli/scaffold/interactive.js +1 -1
  48. package/dist/node/cli/scaffold/invisibleChars.js +52 -0
  49. package/dist/node/cli/scaffold/versions.js +10 -10
  50. package/dist/node/cli/see.js +3 -3
  51. package/dist/node/cli/startPanel.js +70 -0
  52. package/dist/node/cli/symbols.js +2 -2
  53. package/dist/node/cli/symbolsGenerate.js +3 -3
  54. package/dist/node/cli/upgrade.js +66 -52
  55. package/dist/node/command/Builder.js +3 -3
  56. package/dist/node/command/Command.js +1 -1
  57. package/dist/node/config/defineEnv.js +1 -1
  58. package/dist/node/finder/Finder.js +2 -2
  59. package/dist/node/index.js +1 -1
  60. package/dist/node/kernel/CliKernel.js +2 -2
  61. package/dist/node/kernel/Kernel.js +5 -5
  62. package/dist/node/kernel/Module.js +3 -3
  63. package/dist/node/kernel/checks/deep.js +3 -3
  64. package/dist/node/kernel/checks/freshness.js +3 -3
  65. package/dist/node/kernel/checks/gating.js +1 -1
  66. package/dist/node/kernel/checks/guards.js +1 -1
  67. package/dist/node/kernel/checks/lastBoot.js +1 -1
  68. package/dist/node/kernel/checks/managerDrift.js +2 -2
  69. package/dist/node/kernel/checks/packageDeps.js +12 -2
  70. package/dist/node/kernel/checks/projectScope.js +2 -2
  71. package/dist/node/kernel/checks/readiness.js +2 -2
  72. package/dist/node/kernel/checks/renderReport.js +1 -1
  73. package/dist/node/kernel/checks/runDoctor.js +3 -3
  74. package/dist/node/kernel/checks/surface.js +2 -2
  75. package/dist/node/kernel/checks/wiring.js +2 -2
  76. package/dist/node/kernel/commands/BuildCommand.js +1 -1
  77. package/dist/node/kernel/commands/ClusterCommand.js +1 -1
  78. package/dist/node/kernel/commands/LicensesCommand.js +2 -2
  79. package/dist/node/kernel/commands/MenuCommand.js +3 -3
  80. package/dist/node/kernel/commands/OutdatedCommand.js +4 -4
  81. package/dist/node/kernel/commands/ProdCommand.js +1 -1
  82. package/dist/node/kernel/commands/UpgradeCommand.js +1 -1
  83. package/dist/node/kernel/commands/runtimeLauncher.js +1 -1
  84. package/dist/node/kernel/decorators/kernelDecorator.js +1 -1
  85. package/dist/node/kernel/injector/injector.js +1 -1
  86. package/dist/node/kernel/injector/serviceOrder.js +1 -1
  87. package/dist/node/kernel/kernelCluster.js +1 -1
  88. package/dist/node/kernel/kernelLog.js +2 -2
  89. package/dist/node/kernel/storeManifest.js +2 -2
  90. package/dist/node/package.json.js +1 -1
  91. package/dist/node/realtime/base64url.js +1 -1
  92. package/dist/node/realtime/codec/decode.js +1 -1
  93. package/dist/node/realtime/codec/encode.js +3 -4
  94. package/dist/node/realtime/throughputProbe.js +1 -1
  95. package/dist/node/runtime/loadEnv.js +1 -1
  96. package/dist/node/runtime/scanPage.js +8 -8
  97. package/dist/node/service/cluster/ClusterManager.js +1 -1
  98. package/dist/node/service/cluster/clusterMaster.js +1 -1
  99. package/dist/node/service/cluster/cpuQuota.js +1 -1
  100. package/dist/node/service/cluster/richProcessProbe.js +1 -1
  101. package/dist/node/service/cluster/topology.js +1 -1
  102. package/dist/node/service/dev/BootReporter.js +1 -1
  103. package/dist/node/service/dev/DevSupervisor.js +5 -5
  104. package/dist/node/service/dev/DevTerminal.js +1 -1
  105. package/dist/node/service/dev/clipboard.js +1 -1
  106. package/dist/node/service/dev/detachedStart.js +5 -5
  107. package/dist/node/service/dev/devProcess.js +2 -2
  108. package/dist/node/service/dev/devProjects.js +2 -2
  109. package/dist/node/service/dev/devStatusReport.js +2 -2
  110. package/dist/node/service/dev/devStop.js +2 -2
  111. package/dist/node/service/dev/devTranscript.js +1 -1
  112. package/dist/node/service/dev/startupScreen.js +1 -1
  113. package/dist/node/syslog/Syslog.js +1 -1
  114. package/dist/node/syslog/drivers/ClusterFileLogDriver.js +2 -2
  115. package/dist/node/syslog/drivers/FileLogDriver.js +1 -1
  116. package/dist/node/syslog/drivers/builtinLogDrivers.js +1 -1
  117. package/dist/node/testing/index.js +5 -5
  118. package/dist/node/testing/stopChildTree.js +1 -1
  119. package/dist/types/cli/installCommand.d.ts +20 -0
  120. package/dist/types/cli/scaffold/engine.d.ts +47 -9
  121. package/dist/types/cli/scaffold/invisibleChars.d.ts +10 -0
  122. package/dist/types/cli/startPanel.d.ts +75 -0
  123. package/dist/types/cli/upgrade.d.ts +10 -0
  124. package/dist/types/kernel/commands/UpgradeCommand.d.ts +1 -1
  125. package/man/nodefony.1 +1 -1
  126. package/package.json +9 -9
  127. package/templates/app/base/README.md.tpl +2 -2
  128. package/templates/app/base/env.ts.tpl +7 -4
  129. package/templates/app/base/nodefony.config.ts.tpl +12 -3
  130. package/templates/app/complete/env.example.tpl +4 -4
  131. package/templates/app/frontend/angular/frontend/src/accent.css.tpl +7 -39
  132. package/templates/app/frontend/angular/frontend/src/app/app.component.ts.tpl +276 -25
  133. package/templates/app/frontend/react/frontend/src/App.tsx.tpl +313 -44
  134. package/templates/app/frontend/react/frontend/src/accent.css.tpl +7 -35
  135. package/templates/app/frontend/shared/frontend/src/brand.ts.tpl +12 -9
  136. package/templates/app/frontend/shared/frontend/src/devHome.ts.tpl +45 -0
  137. package/templates/app/frontend/shared/frontend/src/homeContent.ts.tpl +229 -0
  138. package/templates/app/frontend/shared/frontend/src/homeEffects.ts.tpl +115 -0
  139. package/templates/app/frontend/shared/frontend/src/showcase.css.tpl +729 -205
  140. package/templates/app/frontend/shared/nodefony/controllers/AppController.ts.tpl +17 -7
  141. package/templates/app/frontend/svelte/frontend/src/App.svelte.tpl +248 -29
  142. package/templates/app/frontend/svelte/frontend/src/accent.css.tpl +7 -39
  143. package/templates/app/frontend/vue/frontend/src/App.vue.tpl +255 -28
  144. package/templates/app/frontend/vue/frontend/src/accent.css.tpl +7 -39
  145. package/templates/app/home/nodefony/controllers/HomeController.ts.tpl +40 -25
  146. package/templates/app/home/nodefony/home/homePage.ts.tpl +163 -0
  147. package/templates/controller/duplex/nodefony/controllers/__NAME__.ts.tpl +1 -1
  148. package/templates/controller/realtime/nodefony/controllers/__NAME__.ts.tpl +1 -1
  149. package/templates/controller/rest/nodefony/controllers/__NAME__.ts.tpl +1 -1
  150. package/templates/demo/front/frontend/src/App.tsx.tpl +57 -84
  151. package/templates/demo/front/frontend/src/demo.css.tpl +12 -134
  152. package/templates/demo/front/frontend/src/effects.ts.tpl +5 -36
  153. package/templates/entity/controller/nodefony/controllers/__PASCAL__Controller.ts.tpl +1 -1
  154. package/templates/demo/front/frontend/src/debugBar.ts.tpl +0 -56
  155. package/templates/demo/front/frontend/src/kit/theme.ts.tpl +0 -51
package/dist/node/Cli.js CHANGED
@@ -1,3 +1,9 @@
1
+ import path from "node:path";
2
+ import fs from "node:fs";
3
+ import { Command } from "commander";
4
+ import { spawn, spawnSync } from "node:child_process";
5
+ import semver from "semver";
6
+ import Table from "cli-table3";
1
7
  import clc from "./colors.js";
2
8
  import Service from "./Service.js";
3
9
  import { DEFAULT_ENGINE_ENVIRONMENT, defaultEngineEnvironment } from "./runtime/engineEnvironment.js";
@@ -8,12 +14,6 @@ import Event from "./Event.js";
8
14
  import Syslog from "./syslog/Syslog.js";
9
15
  import { portableSpawn } from "./cli/execPortable.js";
10
16
  import { onTerminalResize } from "./runtime/isTerminal.js";
11
- import fs from "node:fs";
12
- import path from "node:path";
13
- import { Command } from "commander";
14
- import { spawn, spawnSync } from "node:child_process";
15
- import semver from "semver";
16
- import Table from "cli-table3";
17
17
  // src/Cli.ts
18
18
  let figletModule = null;
19
19
  /**
@@ -1,10 +1,10 @@
1
1
  import { constructorName } from "./runtime/constructorName.js";
2
+ import assert from "node:assert";
2
3
  import { Nodefony } from "./Nodefony.js";
3
4
  import { typeOf } from "./Tools.js";
4
- import clc from "./colors.js";
5
- import { inspect } from "node:util";
6
- import assert from "node:assert";
7
5
  import { STATUS_CODES } from "node:http";
6
+ import { inspect } from "node:util";
7
+ import clc from "./colors.js";
8
8
  // src/Error.ts
9
9
  Object.defineProperty(Error.prototype, "toJSON", {
10
10
  configurable: true,
@@ -1,5 +1,5 @@
1
- import { unrefTimer } from "./runtime/unrefTimer.js";
2
1
  import { EventEmitter } from "node:events";
2
+ import { unrefTimer } from "./runtime/unrefTimer.js";
3
3
  // src/Event.ts
4
4
  const regListenOn = /^on(.*)$/;
5
5
  /**
@@ -1,9 +1,9 @@
1
- import { extend } from "./Tools.js";
1
+ import mime from "mime-types";
2
2
  import crypto from "node:crypto";
3
- import fs from "node:fs";
4
3
  import path from "node:path";
5
- import mime from "mime-types";
4
+ import fs from "node:fs";
6
5
  import fsp from "node:fs/promises";
6
+ import { extend } from "./Tools.js";
7
7
  // src/FileClass.ts
8
8
  const checkPath = function(myPath) {
9
9
  if (!myPath) throw new Error(`Bad path`);
@@ -1,6 +1,6 @@
1
1
  import { version } from "./package.json.js";
2
- import { registerPackageInstance } from "./runtime/packageInstances.js";
3
2
  import { randomUUID, randomUUIDv7 } from "node:crypto";
3
+ import { registerPackageInstance } from "./runtime/packageInstances.js";
4
4
  // src/Nodefony.ts
5
5
  registerPackageInstance(import.meta.url, version);
6
6
  /**
@@ -1,7 +1,7 @@
1
- import { buildReportDevtools } from "./buildReport.js";
2
1
  import { globSync, readFileSync } from "node:fs";
3
2
  import path from "node:path";
4
3
  import { defineConfig } from "rolldown";
4
+ import { buildReportDevtools } from "./buildReport.js";
5
5
  // src/bundler/index.ts
6
6
  /**
7
7
  * nodefony/bundler — config rolldown partagée des packages ET des applications Nodefony.
@@ -1,7 +1,7 @@
1
+ import path from "node:path";
2
+ import { homedir } from "node:os";
1
3
  import { MCP_CONFIG_FILE, MCP_SERVER_KEY, MCP_TOKEN_ENV } from "./aiMcpReport.js";
2
4
  import { isPlainObject } from "../runtime/isPlainObject.js";
3
- import { homedir } from "node:os";
4
- import path from "node:path";
5
5
  // src/cli/agentTargets.ts
6
6
  /**
7
7
  * Les agents de développement, et ce que Nodefony sait faire pour eux.
@@ -1,3 +1,5 @@
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import path from "node:path";
1
3
  import { printUsage, printUsageError } from "./usageReport.js";
2
4
  import { writeAgentPointers } from "./scaffold/engine.js";
3
5
  import "./sysexits.js";
@@ -11,8 +13,6 @@ import { AGENT_TARGETS, agentRoot, agentsPresents, litVariable, planAgentDeclara
11
13
  import { spawnedOutput } from "../runtime/spawnedOutput.js";
12
14
  import { isTerminal } from "../runtime/isTerminal.js";
13
15
  import { stripTrailingSlashes } from "../Tools.js";
14
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
15
- import path from "node:path";
16
16
  // src/cli/aiMcp.ts
17
17
  /**
18
18
  * `nodefony ai:mcp` — déclare le serveur MCP de cette application à ton agent.
@@ -1,11 +1,11 @@
1
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import path from "node:path";
1
3
  import { printUsage, printUsageError } from "./usageReport.js";
2
4
  import "./sysexits.js";
3
5
  import { findProjectRoot } from "./projectRoot.js";
4
6
  import { installedPackageRoots, listDir } from "./installedPackages.js";
5
7
  import { SKILLS_DIR, planSync, renderPlan } from "./aiSyncReport.js";
6
8
  import { stripGlobalCliFlags } from "./globalFlags.js";
7
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
8
- import path from "node:path";
9
9
  // src/cli/aiSync.ts
10
10
  /** La page d'aide — `nodefony ai:sync --help`, et le rappel après un refus. */
11
11
  const AI_SYNC_USAGE = {
@@ -1,10 +1,10 @@
1
+ import { readFileSync, readdirSync } from "node:fs";
2
+ import path from "node:path";
1
3
  import "./sysexits.js";
2
4
  import { findProjectRoot } from "./projectRoot.js";
3
5
  import { printUsage, printUsageError } from "./usageReport.js";
4
6
  import { stripGlobalCliFlags } from "./globalFlags.js";
5
7
  import { buildCard, renderCard } from "./cardReport.js";
6
- import { readFileSync, readdirSync } from "node:fs";
7
- import path from "node:path";
8
8
  // src/cli/card.ts
9
9
  /**
10
10
  * `nodefony card [--json]` — qui répond, et où aller ensuite.
@@ -1,5 +1,5 @@
1
- import { RESERVED_ENV } from "../config/reservedEnv.js";
2
1
  import semver from "semver";
2
+ import { RESERVED_ENV } from "../config/reservedEnv.js";
3
3
  // src/cli/cliFreshness.ts
4
4
  /** Délai maximal accordé au registre : au-delà, on se tait. */
5
5
  const FRESHNESS_TIMEOUT_MS = 1500;
@@ -1,11 +1,11 @@
1
+ import { rename, writeFile } from "node:fs/promises";
2
+ import { mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync, writeSync } from "node:fs";
3
+ import os from "node:os";
4
+ import path from "node:path";
1
5
  import "./sysexits.js";
2
6
  import { printUsage, printUsageError } from "./usageReport.js";
3
7
  import { OPTION_SUGGESTIONS } from "../command/Command.js";
4
8
  import { stripGlobalCliFlags } from "./globalFlags.js";
5
- import { mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync, writeSync } from "node:fs";
6
- import os from "node:os";
7
- import path from "node:path";
8
- import { rename, writeFile } from "node:fs/promises";
9
9
  // src/cli/completion.ts
10
10
  /** Chemin du manifest cache — même dossier que le pidfile superviseur. */
11
11
  function cliManifestFile(cwd) {
@@ -1,4 +1,8 @@
1
1
  import { isPlainObject } from "../runtime/isPlainObject.js";
2
+ import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
3
+ import { createHash } from "node:crypto";
4
+ import path from "node:path";
5
+ import { pathToFileURL } from "node:url";
2
6
  import { printUsage, printUsageError } from "./usageReport.js";
3
7
  import "./sysexits.js";
4
8
  import { findProjectRoot } from "./projectRoot.js";
@@ -7,10 +11,6 @@ import { stripGlobalCliFlags } from "./globalFlags.js";
7
11
  import "../Tools.js";
8
12
  import { CONTRIBUTE_FIELD, declaredPackageEntry, resolveInside } from "./packageManifest.js";
9
13
  import { manifestString, parsePackageManifest } from "./scaffold/packageManifest.js";
10
- import { createHash } from "node:crypto";
11
- import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
12
- import path from "node:path";
13
- import { pathToFileURL } from "node:url";
14
14
  // src/cli/contributions.ts
15
15
  /** Le nom du registre de provenance, à la racine de l'application. */
16
16
  const SCAFFOLD_LOCK_FILE = "scaffold.lock.json";
@@ -227,8 +227,7 @@ async function runAppContributions(appRoot, dryRun = false, update = false) {
227
227
  const entry = resolveInside(pkg.dir, declared.replace(/^\.\//u, ""));
228
228
  const loaded = await import(pathToFileURL(entry).href);
229
229
  if (typeof loaded.contribute !== "function") throw new Error(`${declared} n'exporte pas de fonction « contribute »`);
230
- const contribute = loaded.contribute;
231
- await contribute(run.context);
230
+ await (0, loaded.contribute)(run.context);
232
231
  } catch (e) {
233
232
  error = e instanceof Error ? e.message : String(e);
234
233
  }
@@ -1,5 +1,8 @@
1
+ import path from "node:path";
1
2
  import { printUsage, printUsageError } from "./usageReport.js";
2
3
  import { usageCatalog, usagePageFor } from "./scaffold/help.js";
4
+ import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
5
+ import { spawnSync } from "node:child_process";
3
6
  import { portableSpawn } from "./execPortable.js";
4
7
  import { envForOtherProject } from "../runtime/loadEnv.js";
5
8
  import { isPackageManagerName, packageManagerCommandLines, packageManagerExecArgs, packageManagerUpdateInstallArgs, resolvePackageManager } from "./packageManager.js";
@@ -8,9 +11,12 @@ import { BOOT_CONFIG_ERROR_LABEL } from "../kernel/bootErrorLabels.js";
8
11
  import { version } from "../package.json.js";
9
12
  import { RESERVED_ENV } from "../config/reservedEnv.js";
10
13
  import { startFreshnessCheck } from "./cliFreshness.js";
11
- import { FRONTEND_CHOICES, capAllows, getScaffoldSpec } from "./scaffold/spec.js";
14
+ import { styleText } from "node:util";
15
+ import { demoAppCommand } from "./installCommand.js";
12
16
  import { findProjectRoot } from "./projectRoot.js";
13
- import { DEV_ADMIN_PASSWORD, MONGOOSE_CONNECTOR, ScaffoldConflictError, getScaffoldContext, listTargets, runScaffold, scaffoldCaps, toKebabCase } from "./scaffold/engine.js";
17
+ import { renderStartPanel } from "./startPanel.js";
18
+ import { FRONTEND_CHOICES, capAllows, getScaffoldSpec } from "./scaffold/spec.js";
19
+ import { MONGOOSE_CONNECTOR, ScaffoldConflictError, getScaffoldContext, listTargets, runScaffold, scaffoldCaps, toKebabCase } from "./scaffold/engine.js";
14
20
  import { formatFilesOnDisk } from "./scaffold/format.js";
15
21
  import { diffLines } from "./scaffold/writer.js";
16
22
  import { askMissing, confirm } from "./scaffold/interactive.js";
@@ -28,9 +34,6 @@ import { reportIsClear } from "../kernel/checks/renderReport.js";
28
34
  import { isTerminal } from "../runtime/isTerminal.js";
29
35
  import { spawnedOutput } from "../runtime/spawnedOutput.js";
30
36
  import { isolatedGitEnv } from "./gitEnv.js";
31
- import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
32
- import path from "node:path";
33
- import { spawnSync } from "node:child_process";
34
37
  // src/cli/create.ts
35
38
  /**
36
39
  * Adaptateur CLI du scaffold `nodefony create <type> [name]` — front n°1 et n°2
@@ -878,7 +881,7 @@ function poseSkillPointers(dest, cmd) {
878
881
  try {
879
882
  const plan = syncSkillPointers(dest);
880
883
  if (plan.skills.length === 0) return `aucun skill livré par les paquets installés → ${cmd.exec("nodefony")} ai:sync après un ${cmd.install}`;
881
- return `${plan.skills.length} dans ${plan.directory}/ (${plan.skills.map((s) => s.name).join(", ")}) — commite-les`;
884
+ return `${plan.skills.length} dans ${plan.directory}/ — commite-les`;
882
885
  } catch (e) {
883
886
  return `non posés (${errorText(e)}) → ${cmd.exec("nodefony")} ai:sync`;
884
887
  }
@@ -1342,8 +1345,7 @@ async function runCreateCommand(argv) {
1342
1345
  } else if (migration !== void 0 && parsed.install && parsed.migrate && depsInstall !== "failed") {
1343
1346
  const root = findProjectRoot(process.cwd());
1344
1347
  if (root !== null) {
1345
- const pm = resolvePackageManager({ dir: root }).name;
1346
- const step = runEntityMigration(root, pm, migration);
1348
+ const step = runEntityMigration(root, resolvePackageManager({ dir: root }).name, migration);
1347
1349
  migrationStep = step.outcome;
1348
1350
  migrationLine = `\n🗄️ migration : ${step.note}\n`;
1349
1351
  if (step.reached === "written") silenced = [migration.advice.command];
@@ -1374,13 +1376,13 @@ async function runCreateCommand(argv) {
1374
1376
  if (migration !== null) {
1375
1377
  migrationWritten = migration.written;
1376
1378
  databaseUnreachable = migration.databaseUnreachable;
1377
- process.stdout.write(`\n🗄️ migration initiale : ${migration.note}\n`);
1379
+ process.stdout.write(`🗄️ migration initiale : ${migration.note}\n`);
1378
1380
  }
1379
1381
  }
1380
- process.stdout.write(`\n⚖️ licences tierces : ${poseThirdPartyNotices(result.dest, installed, cmd)}\n`);
1381
- process.stdout.write(`\n🤖 skills d'agent : ${poseSkillPointers(result.dest, cmd)}\n`);
1382
- process.stdout.write(`\n🧩 fichiers livrés par les paquets : ${await poseContributions(result.dest, installed, cmd)}\n`);
1383
- process.stdout.write(`\n📄 .env.example : ${poseEnvNotice(result.dest, installed, cmd)}\n`);
1382
+ process.stdout.write(`⚖️ licences tierces : ${poseThirdPartyNotices(result.dest, installed, cmd)}\n`);
1383
+ process.stdout.write(`🤖 skills d'agent : ${poseSkillPointers(result.dest, cmd)}\n`);
1384
+ process.stdout.write(`🧩 fichiers livrés par les paquets : ${await poseContributions(result.dest, installed, cmd)}\n`);
1385
+ process.stdout.write(`📄 .env.example : ${poseEnvNotice(result.dest, installed, cmd)}\n`);
1384
1386
  const chosen = Array.isArray(answers.agents) ? answers.agents : [];
1385
1387
  const wiring = mcpWiringPlan({
1386
1388
  chosen: chosen.length,
@@ -1404,12 +1406,29 @@ async function runCreateCommand(argv) {
1404
1406
  if (tokenNote !== "") process.stdout.write(`🔌 agents IA : ${tokenNote}\n`);
1405
1407
  const gitNote = parsed.git ? runGitInit(result.dest, String(answers.name), answers.gitHooks === true, cmd) : "sauté (--no-git)";
1406
1408
  process.stdout.write(`🌱 git : ${gitNote}\n`);
1407
- const needsInfra = answers.preset !== "minimal" && answers.database !== void 0 && answers.database !== "sqlite";
1408
- process.stdout.write(`\nProchaines étapes :\n` + (relDest === "." ? "" : ` cd ${relDest}\n`) + (installed ? "" : ` ${cmd.install}\n`) + (built ? "" : ` ${cmd.run("build")}\n`) + (needsInfra ? ` ${cmd.run("infra:up")} # docker : ${String(answers.database)} + Redis (NF_DATABASE_URL pointe dessus)\n` : "") + (!migrationWritten && appDeclareUnOrm(result.dest) ? ` ${cmd.exec("nodefony")} orm:generate --name init # écrit la migration de ta table User\n ${cmd.exec("nodefony")} orm:migrate # l'APPLIQUE — sans elle, aucune table\n` : "") + (answers.preset === "complete" && answers.frontend === "none" ? ` ${cmd.exec("nodefony")} create front --frontend <${FRONTEND_CHOICES.filter((c) => c !== "none").join("|")}>\n # page, connexion et temps réel LIVRÉS — ne les écris pas à la main\n` : "") + ` ${cmd.run("dev")} # → https://127.0.0.1:5152 (ou le port libre suivant, annoncé au démarrage)\n` + (answers.preset === "complete" ? ` # console d'administration : /nodefony — admin / ${DEV_ADMIN_PASSWORD} en dev (NF_ADMIN_PASSWORD)\n` : "") + (mcpNote !== "" ? ` ${cmd.exec("nodefony")} ai:mcp # câbler ton agent IA (porte MCP + jeton)\n` : "") + (tokenNote !== "" ? ` ${cmd.exec("nodefony")} security:mcp:token --write # jeton MCP — la base doit répondre (après infra:up)\n` : ""));
1409
+ const startPanel = renderStartPanel({
1410
+ relDest,
1411
+ commands: cmd,
1412
+ installed,
1413
+ built,
1414
+ infra: answers.preset !== "minimal" && answers.database !== void 0 && answers.database !== "sqlite" ? String(answers.database) : null,
1415
+ migrationPending: !migrationWritten && appDeclareUnOrm(result.dest),
1416
+ admin: answers.preset === "complete" && result.devAdminPassword !== void 0 ? {
1417
+ user: "admin",
1418
+ password: result.devAdminPassword
1419
+ } : null,
1420
+ addFrontend: answers.preset === "complete" && answers.frontend === "none" ? FRONTEND_CHOICES.filter((c) => c !== "none") : null,
1421
+ agent: tokenNote !== "" ? { kind: "token-missing" } : mcpNote !== "" ? { kind: "to-wire" } : { kind: "wired" },
1422
+ demo: answers.demo === true ? { installed: true } : {
1423
+ installed: false,
1424
+ command: demoAppCommand(version)
1425
+ }
1426
+ }, (text) => styleText("bold", text));
1409
1427
  if (!compact) process.stdout.write(renderAgentBrief(relDest));
1410
1428
  if (installed) await showAppState(result.dest, compact);
1411
1429
  const staleNotice = await freshness;
1412
1430
  if (staleNotice !== null) process.stderr.write(staleNotice);
1431
+ process.stdout.write(startPanel);
1413
1432
  return createExitCode(parsed.install ? installed ? "succeeded" : "failed" : "skipped", installed ? built ? "succeeded" : "failed" : "skipped");
1414
1433
  }
1415
1434
  /**
@@ -1,4 +1,8 @@
1
+ import { existsSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { parseEnv } from "node:util";
3
+ import path from "node:path";
1
4
  import { printUsage, printUsageError } from "./usageReport.js";
5
+ import { pathToFileURL } from "node:url";
2
6
  import "./sysexits.js";
3
7
  import { findProjectRoot } from "./projectRoot.js";
4
8
  import { appEnvironment, configInconsistencies } from "../kernel/checks/projectScope.js";
@@ -16,10 +20,6 @@ import { renderEnvReport } from "./envRender.js";
16
20
  import { isTerminal } from "../runtime/isTerminal.js";
17
21
  import { shouldColorize, usableWidth } from "../kernel/checks/report.js";
18
22
  import { buildEnvReport } from "./envReport.js";
19
- import { parseEnv } from "node:util";
20
- import { existsSync, readFileSync, writeFileSync } from "node:fs";
21
- import path from "node:path";
22
- import { pathToFileURL } from "node:url";
23
23
  // src/cli/env.ts
24
24
  /** Parse l'argv après le mot `env`. */
25
25
  function parseEnvArgv(argv) {
@@ -1,12 +1,12 @@
1
+ import { chmodSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
2
+ import { execFileSync } from "node:child_process";
3
+ import path from "node:path";
1
4
  import { printUsage, printUsageError } from "./usageReport.js";
2
5
  import "./sysexits.js";
3
6
  import { isolatedGitEnv } from "./gitEnv.js";
4
7
  import { findProjectRoot } from "./projectRoot.js";
5
8
  import { stripGlobalCliFlags } from "./globalFlags.js";
6
9
  import { GIT_HOOKS_DIR, planGitHooks, renderGitHooksPlan } from "./gitHooksReport.js";
7
- import { chmodSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
8
- import path from "node:path";
9
- import { execFileSync } from "node:child_process";
10
10
  // src/cli/gitHooks.ts
11
11
  /** La page d'aide — `nodefony git:hooks --help`, et le rappel après un refus. */
12
12
  const GIT_HOOKS_USAGE = {
@@ -1,9 +1,9 @@
1
+ import fs from "node:fs";
1
2
  import "../sysexits.js";
2
3
  import { stripGlobalCliFlags } from "../globalFlags.js";
3
4
  import { printUsage, printUsageError } from "../usageReport.js";
4
5
  import { detectSuspectImageFiles } from "./suspectFiles.js";
5
6
  import { BlindCheckError, imageContents, saveImage } from "./tarLayers.js";
6
- import fs from "node:fs";
7
7
  // src/cli/image/index.ts
8
8
  /**
9
9
  * **`nodefony image:check` — refuser une image de conteneur qui embarque un
@@ -1,8 +1,8 @@
1
1
  import fs from "node:fs";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
- import { spawnSync } from "node:child_process";
5
4
  import zlib from "node:zlib";
5
+ import { spawnSync } from "node:child_process";
6
6
  // src/cli/image/tarLayers.ts
7
7
  /**
8
8
  * **Lire les COUCHES d'une image de conteneur** — pas son arborescence finale.
@@ -58,6 +58,19 @@ function npmChannelOf(version) {
58
58
  return dot === -1 ? prerelease : prerelease.slice(0, dot);
59
59
  }
60
60
  /**
61
+ * Spécificateur npm d'un paquet du framework pour la version donnée, canal
62
+ * NOMMÉ tant que c'est une préversion (`@nodefony/http@beta`), nu pour une
63
+ * stable — `latest` est alors la ligne de cette version.
64
+ *
65
+ * @param name - nom npm du paquet (`nodefony`, `@nodefony/http`…)
66
+ * @param version - version du framework ; défaut : celle du paquet qui tourne
67
+ * @returns le spécificateur, prêt à écrire dans une commande
68
+ */
69
+ function packageSpec(name, version$1 = version) {
70
+ const channel = npmChannelOf(version$1);
71
+ return channel === null || channel === "latest" ? name : `${name}@${channel}`;
72
+ }
73
+ /**
61
74
  * Commande qui crée une application de la version donnée, canal NOMMÉ tant que
62
75
  * c'est une préversion : `npm create nodefony@beta mon-app`. Une stable
63
76
  * s'écrit sans canal, `latest` étant alors la ligne de cette version.
@@ -66,9 +79,20 @@ function npmChannelOf(version) {
66
79
  * @param version - version du framework ; défaut : celle du paquet qui tourne
67
80
  * @returns la commande, prête à copier
68
81
  */
69
- function createAppCommand(appName, version$1 = version) {
70
- const channel = npmChannelOf(version$1);
71
- const spec = channel === null || channel === "latest" ? "nodefony" : `nodefony@${channel}`;
82
+ function createAppCommand(appName, version$2 = version) {
83
+ const spec = packageSpec("nodefony", version$2);
72
84
  return appName === "" ? `npm create ${spec}` : `npm create ${spec} ${appName}`;
73
85
  }
74
- export { NODE_ENGINE_LABEL, NODE_ENGINE_RANGE, createAppCommand, describeNodeRange, npmChannelOf };
86
+ /**
87
+ * Commande qui crée une application JETABLE portant la démo :
88
+ * `npm create nodefony essai -- --demo`. La démo sert à apprendre, pas à
89
+ * rester — on ne l'ajoute pas à une application, on en crée une pour elle.
90
+ * Une seule règle pour la fin de `create app` et l'accueil de développement.
91
+ *
92
+ * @param version - version du framework ; défaut : celle du paquet qui tourne
93
+ * @returns la commande, prête à copier
94
+ */
95
+ function demoAppCommand(version$3 = version) {
96
+ return `${createAppCommand("essai", version$3)} -- --demo`;
97
+ }
98
+ export { NODE_ENGINE_LABEL, NODE_ENGINE_RANGE, createAppCommand, demoAppCommand, describeNodeRange, npmChannelOf, packageSpec };
@@ -1,7 +1,7 @@
1
- import { isPlainObject } from "../runtime/isPlainObject.js";
2
- import { manifestString, parsePackageManifest } from "./scaffold/packageManifest.js";
3
1
  import { readFileSync, readdirSync } from "node:fs";
4
2
  import path from "node:path";
3
+ import { isPlainObject } from "../runtime/isPlainObject.js";
4
+ import { manifestString, parsePackageManifest } from "./scaffold/packageManifest.js";
5
5
  // src/cli/installedPackages.ts
6
6
  /**
7
7
  * Les paquets que CE projet produit lui-même — ses espaces de travail.
@@ -1,9 +1,9 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import fs from "node:fs";
3
+ import path from "node:path";
1
4
  import { portableSpawn } from "./execPortable.js";
2
5
  import { spawnedOutput } from "../runtime/spawnedOutput.js";
3
6
  import { isPlainObject } from "../runtime/isPlainObject.js";
4
- import fs from "node:fs";
5
- import path from "node:path";
6
- import { spawnSync } from "node:child_process";
7
7
  // src/cli/licenses.ts
8
8
  /**
9
9
  * Le relevé des licences d'un arbre de production — et la décision de ce qui est acceptable.
@@ -1,9 +1,9 @@
1
+ import path from "node:path";
2
+ import { spawnSync } from "node:child_process";
1
3
  import { printUsage, printUsageError } from "./usageReport.js";
2
4
  import "./sysexits.js";
3
5
  import { stripGlobalCliFlags } from "./globalFlags.js";
4
6
  import { findPackageRoot } from "./scaffold/engine.js";
5
- import path from "node:path";
6
- import { spawnSync } from "node:child_process";
7
7
  // src/cli/man.ts
8
8
  /** La page d'aide — `nodefony man --help`, et le rappel après un refus. */
9
9
  const MAN_USAGE = {
@@ -1,5 +1,5 @@
1
- import { groupCommands } from "./helpReport.js";
2
1
  import { Buffer } from "node:buffer";
2
+ import { groupCommands } from "./helpReport.js";
3
3
  // src/cli/manPage.ts
4
4
  /**
5
5
  * Page de manuel Unix (`man nodefony`), rendue depuis le manifest du CLI.
@@ -1,5 +1,5 @@
1
- import { isPlainObject } from "../runtime/isPlainObject.js";
2
1
  import semver from "semver";
2
+ import { isPlainObject } from "../runtime/isPlainObject.js";
3
3
  // src/cli/outdated.ts
4
4
  const optionalString = (v) => v === void 0 || v === null || typeof v === "string";
5
5
  /** Une entrée reconnue, ou `null` — `wanted` et `latest` textuels, le reste textuel ou absent. */
@@ -1,6 +1,6 @@
1
+ import readline from "node:readline";
1
2
  import { isTerminal } from "../runtime/isTerminal.js";
2
3
  import { guardTerminal } from "../runtime/terminalGuard.js";
3
- import readline from "node:readline";
4
4
  // src/cli/progress.ts
5
5
  /**
6
6
  * Indicateurs d'attente et de progression pour un terminal — la seule
@@ -1,5 +1,5 @@
1
- import { existsSync } from "node:fs";
2
1
  import path from "node:path";
2
+ import { existsSync } from "node:fs";
3
3
  // src/cli/projectRoot.ts
4
4
  /**
5
5
  * Racine du PROJET Nodefony courant (app générée / app utilisateur) : remonte
@@ -41,7 +41,7 @@
41
41
  * @returns la fonction qui relâche l'ancre ; l'appeler deux fois est sans effet.
42
42
  */
43
43
  function anchorEventLoop() {
44
- const timer = setInterval(() => {}, 2147483647);
44
+ const timer = setInterval(() => {}, 0x7fffffff);
45
45
  return () => clearInterval(timer);
46
46
  }
47
47
  /**