nodefony 10.0.0-beta.9 → 10.0.0

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 (118) hide show
  1. package/.ai/symbols.json +24 -2
  2. package/CHANGELOG.md +15 -0
  3. package/README.md +8 -15
  4. package/dist/bin/nodefony.js +1 -1
  5. package/dist/client/client/angular/index.js +1 -1
  6. package/dist/client/client/react/index.js +1 -1
  7. package/dist/client/client/sse/NodefonySse.js +1 -1
  8. package/dist/client/client/svelte/index.js +1 -1
  9. package/dist/client/client/vue/index.js +1 -1
  10. package/dist/client/debugbar.standalone.js +1 -1
  11. package/dist/client/realtime/base64url.js +1 -1
  12. package/dist/client/realtime/codec/decode.js +1 -1
  13. package/dist/client/realtime/codec/encode.js +3 -4
  14. package/dist/client/realtime/throughputProbe.js +1 -1
  15. package/dist/node/Cli.js +6 -6
  16. package/dist/node/Error.js +3 -3
  17. package/dist/node/Event.js +1 -1
  18. package/dist/node/FileClass.js +3 -3
  19. package/dist/node/Nodefony.js +1 -1
  20. package/dist/node/bundler/index.js +1 -1
  21. package/dist/node/cli/agentTargets.js +2 -2
  22. package/dist/node/cli/aiMcp.js +2 -2
  23. package/dist/node/cli/aiSync.js +2 -2
  24. package/dist/node/cli/card.js +2 -2
  25. package/dist/node/cli/cliFreshness.js +1 -1
  26. package/dist/node/cli/completion.js +4 -4
  27. package/dist/node/cli/contributions.js +5 -6
  28. package/dist/node/cli/create.js +4 -5
  29. package/dist/node/cli/env.js +4 -4
  30. package/dist/node/cli/gitHooks.js +3 -3
  31. package/dist/node/cli/image/index.js +1 -1
  32. package/dist/node/cli/image/tarLayers.js +1 -1
  33. package/dist/node/cli/installCommand.js +16 -4
  34. package/dist/node/cli/installedPackages.js +2 -2
  35. package/dist/node/cli/licenses.js +3 -3
  36. package/dist/node/cli/man.js +2 -2
  37. package/dist/node/cli/manPage.js +1 -1
  38. package/dist/node/cli/outdated.js +1 -1
  39. package/dist/node/cli/progress.js +1 -1
  40. package/dist/node/cli/projectRoot.js +1 -1
  41. package/dist/node/cli/prompts.js +1 -1
  42. package/dist/node/cli/scaffold/engine.js +5 -5
  43. package/dist/node/cli/scaffold/format.js +1 -1
  44. package/dist/node/cli/scaffold/interactive.js +1 -1
  45. package/dist/node/cli/scaffold/versions.js +4 -4
  46. package/dist/node/cli/see.js +3 -3
  47. package/dist/node/cli/symbols.js +2 -2
  48. package/dist/node/cli/symbolsGenerate.js +3 -3
  49. package/dist/node/cli/upgrade.js +66 -52
  50. package/dist/node/command/Builder.js +3 -3
  51. package/dist/node/command/Command.js +1 -1
  52. package/dist/node/config/defineEnv.js +1 -1
  53. package/dist/node/finder/Finder.js +2 -2
  54. package/dist/node/kernel/CliKernel.js +2 -2
  55. package/dist/node/kernel/Kernel.js +5 -5
  56. package/dist/node/kernel/Module.js +3 -3
  57. package/dist/node/kernel/checks/deep.js +3 -3
  58. package/dist/node/kernel/checks/freshness.js +3 -3
  59. package/dist/node/kernel/checks/gating.js +1 -1
  60. package/dist/node/kernel/checks/guards.js +1 -1
  61. package/dist/node/kernel/checks/lastBoot.js +1 -1
  62. package/dist/node/kernel/checks/managerDrift.js +2 -2
  63. package/dist/node/kernel/checks/packageDeps.js +1 -1
  64. package/dist/node/kernel/checks/projectScope.js +2 -2
  65. package/dist/node/kernel/checks/readiness.js +2 -2
  66. package/dist/node/kernel/checks/renderReport.js +1 -1
  67. package/dist/node/kernel/checks/runDoctor.js +3 -3
  68. package/dist/node/kernel/checks/surface.js +2 -2
  69. package/dist/node/kernel/checks/wiring.js +2 -2
  70. package/dist/node/kernel/commands/BuildCommand.js +1 -1
  71. package/dist/node/kernel/commands/ClusterCommand.js +1 -1
  72. package/dist/node/kernel/commands/LicensesCommand.js +2 -2
  73. package/dist/node/kernel/commands/MenuCommand.js +3 -3
  74. package/dist/node/kernel/commands/OutdatedCommand.js +4 -4
  75. package/dist/node/kernel/commands/ProdCommand.js +1 -1
  76. package/dist/node/kernel/commands/UpgradeCommand.js +1 -1
  77. package/dist/node/kernel/commands/runtimeLauncher.js +1 -1
  78. package/dist/node/kernel/decorators/kernelDecorator.js +1 -1
  79. package/dist/node/kernel/injector/injector.js +1 -1
  80. package/dist/node/kernel/injector/serviceOrder.js +1 -1
  81. package/dist/node/kernel/kernelCluster.js +1 -1
  82. package/dist/node/kernel/kernelLog.js +2 -2
  83. package/dist/node/kernel/storeManifest.js +2 -2
  84. package/dist/node/package.json.js +1 -1
  85. package/dist/node/realtime/base64url.js +1 -1
  86. package/dist/node/realtime/codec/decode.js +1 -1
  87. package/dist/node/realtime/codec/encode.js +3 -4
  88. package/dist/node/realtime/throughputProbe.js +1 -1
  89. package/dist/node/runtime/loadEnv.js +1 -1
  90. package/dist/node/runtime/scanPage.js +8 -8
  91. package/dist/node/service/cluster/ClusterManager.js +1 -1
  92. package/dist/node/service/cluster/clusterMaster.js +1 -1
  93. package/dist/node/service/cluster/cpuQuota.js +1 -1
  94. package/dist/node/service/cluster/richProcessProbe.js +1 -1
  95. package/dist/node/service/cluster/topology.js +1 -1
  96. package/dist/node/service/dev/BootReporter.js +1 -1
  97. package/dist/node/service/dev/DevSupervisor.js +5 -5
  98. package/dist/node/service/dev/DevTerminal.js +1 -1
  99. package/dist/node/service/dev/clipboard.js +1 -1
  100. package/dist/node/service/dev/detachedStart.js +5 -5
  101. package/dist/node/service/dev/devProcess.js +2 -2
  102. package/dist/node/service/dev/devProjects.js +2 -2
  103. package/dist/node/service/dev/devStatusReport.js +2 -2
  104. package/dist/node/service/dev/devStop.js +2 -2
  105. package/dist/node/service/dev/devTranscript.js +1 -1
  106. package/dist/node/service/dev/startupScreen.js +1 -1
  107. package/dist/node/syslog/Syslog.js +1 -1
  108. package/dist/node/syslog/drivers/ClusterFileLogDriver.js +2 -2
  109. package/dist/node/syslog/drivers/FileLogDriver.js +1 -1
  110. package/dist/node/syslog/drivers/builtinLogDrivers.js +1 -1
  111. package/dist/node/testing/index.js +5 -5
  112. package/dist/node/testing/stopChildTree.js +1 -1
  113. package/dist/types/cli/installCommand.d.ts +10 -0
  114. package/dist/types/cli/upgrade.d.ts +10 -0
  115. package/dist/types/kernel/commands/UpgradeCommand.d.ts +1 -1
  116. package/man/nodefony.1 +1 -1
  117. package/package.json +5 -5
  118. package/templates/app/base/README.md.tpl +1 -1
@@ -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
  /**
@@ -1,4 +1,9 @@
1
+ import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
2
+ import { randomBytes } from "node:crypto";
3
+ import path from "node:path";
1
4
  import { pointeursInstructions } from "../agentTargets.js";
5
+ import { fileURLToPath } from "node:url";
6
+ import { Eta } from "eta";
2
7
  import { NODE_ENGINE_LABEL, createAppCommand } from "../installCommand.js";
3
8
  import { IMAGE_NODEFONY_BIN } from "../nodefonyBin.js";
4
9
  import { findProjectRoot } from "../projectRoot.js";
@@ -21,11 +26,6 @@ import { CONTROLLER_KIND_CHOICES, FRONTEND_CHOICES, flagFor, getScaffoldSpec } f
21
26
  import { openSiblingRoutes } from "./routePaths.js";
22
27
  import { nodefonyImports } from "../../kernel/checks/packageDeps.js";
23
28
  import { connectorVersionsMigrations } from "../../kernel/migrationsLayout.js";
24
- import { randomBytes } from "node:crypto";
25
- import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
26
- import path from "node:path";
27
- import { fileURLToPath } from "node:url";
28
- import { Eta } from "eta";
29
29
  // src/cli/scaffold/engine.ts
30
30
  /**
31
31
  * Options du moteur de gabarits, **écrites une seule fois** : sept rendus les
@@ -1,7 +1,7 @@
1
+ import { spawnSync } from "node:child_process";
1
2
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
2
3
  import path from "node:path";
3
4
  import { pathToFileURL } from "node:url";
4
- import { spawnSync } from "node:child_process";
5
5
  // src/cli/scaffold/format.ts
6
6
  /**
7
7
  * Met en forme ce que le scaffold produit, avec le prettier DU PROJET.
@@ -1,9 +1,9 @@
1
+ import readline from "node:readline/promises";
1
2
  import { anchorEventLoop, chargePrompts } from "../prompts.js";
2
3
  import clc from "../../colors.js";
3
4
  import { capAllows } from "./spec.js";
4
5
  import { composeEntityFields } from "./entityFieldsDialog.js";
5
6
  import { hydrateQuestion } from "./engine.js";
6
- import readline from "node:readline/promises";
7
7
  // src/cli/scaffold/interactive.ts
8
8
  /**
9
9
  * Front INTERACTIF du scaffold. Ne décide RIEN : il pose ce que la spec
@@ -26,10 +26,10 @@ const SCAFFOLD_VERSIONS = {
26
26
  oxlint: "^1.94.0",
27
27
  "oxlint-tsgolint": "^7.0.2007",
28
28
  prettier: "^3.10.1",
29
- rolldown: "^1.3.2",
29
+ rolldown: "^1.3.3",
30
30
  typescript: "^6.0.3",
31
- vitest: "^5.1.0",
32
- "@vitest/coverage-v8": "^5.1.0",
31
+ vitest: "^5.1.1",
32
+ "@vitest/coverage-v8": "^5.1.1",
33
33
  "@connectrpc/connect": "2.3.0",
34
34
  "@connectrpc/connect-node": "2.3.0",
35
35
  "@bufbuild/protobuf": "2.17.0",
@@ -45,7 +45,7 @@ const SCAFFOLD_VERSIONS = {
45
45
  katex: "^0.19.1",
46
46
  vue: "^3.5.45",
47
47
  "@vitejs/plugin-vue": "^6.0.11",
48
- svelte: "^5.57.3",
48
+ svelte: "^5.58.0",
49
49
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
50
50
  "vue-tsc": "^3.3.14",
51
51
  "svelte-check": "^4.7.8",
@@ -1,10 +1,10 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { existsSync } from "node:fs";
3
+ import path from "node:path";
1
4
  import { findProjectRoot } from "./projectRoot.js";
2
5
  import { portableSpawn } from "./execPortable.js";
3
6
  import { printUsage, printUsageError } from "./usageReport.js";
4
7
  import { stripGlobalCliFlags } from "./globalFlags.js";
5
- import { existsSync } from "node:fs";
6
- import path from "node:path";
7
- import { spawnSync } from "node:child_process";
8
8
  // src/cli/see.ts
9
9
  /**
10
10
  * Les trois façons de regarder un écran, et ce que chacune exige.
@@ -1,10 +1,10 @@
1
+ import { existsSync, readFileSync } 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 { stripGlobalCliFlags } from "./globalFlags.js";
5
7
  import { generateProjectSymbols } from "./symbolsGenerate.js";
6
- import { existsSync, readFileSync } from "node:fs";
7
- import path from "node:path";
8
8
  // src/cli/symbols.ts
9
9
  /**
10
10
  * Le GRAPHE SYMBOLIQUE du framework — où le trouver, et comment l'interroger.
@@ -1,9 +1,9 @@
1
- import { SYMBOLS_PRODUCER_APPLICATION, buildSymbolsGraph, readSourceInputs, readSymbolsProducer, writeFileAtomic } from "./symbolsGraph.js";
2
- import { packageManagerCommandLines, resolvePackageManager } from "./packageManager.js";
3
- import "./sysexits.js";
4
1
  import fs from "node:fs";
5
2
  import path from "node:path";
6
3
  import { pathToFileURL } from "node:url";
4
+ import { SYMBOLS_PRODUCER_APPLICATION, buildSymbolsGraph, readSourceInputs, readSymbolsProducer, writeFileAtomic } from "./symbolsGraph.js";
5
+ import { packageManagerCommandLines, resolvePackageManager } from "./packageManager.js";
6
+ import "./sysexits.js";
7
7
  // src/cli/symbolsGenerate.ts
8
8
  /**
9
9
  * `nodefony symbols --generate` — le graphe symbolique du code d'une
@@ -1,65 +1,79 @@
1
+ import path from "node:path";
1
2
  import { version } from "../package.json.js";
2
3
  import { printUsage, printUsageError } from "./usageReport.js";
3
4
  import "./sysexits.js";
4
5
  import { findProjectRoot } from "./projectRoot.js";
6
+ import { npmChannelOf, packageSpec } from "./installCommand.js";
5
7
  import { stripGlobalCliFlags } from "./globalFlags.js";
6
8
  import { syncSkillPointers } from "./aiSync.js";
7
9
  import { syncEnvExample } from "./env.js";
8
10
  import { runAppContributions } from "./contributions.js";
9
11
  import { refreshAgentsGuide } from "./scaffold/engine.js";
10
- import path from "node:path";
11
12
  // src/cli/upgrade.ts
13
+ /**
14
+ * La page d'aide de `nodefony upgrade` pour une version du framework.
15
+ *
16
+ * Le canal s'y CALCULE (`packageSpec`) : écrit en dur, il affirmait encore
17
+ * « `latest` sert la 7 » dans l'aide de la stable.
18
+ *
19
+ * @param frameworkVersion - version du framework qui affiche l'aide
20
+ * @returns la page d'aide
21
+ */
22
+ function upgradeUsage(frameworkVersion) {
23
+ const channel = npmChannelOf(frameworkVersion);
24
+ return {
25
+ command: "nodefony upgrade",
26
+ tagline: "remet l'application au niveau de la version de Nodefony installée, après une montée de version",
27
+ sections: [
28
+ {
29
+ title: "AVANT",
30
+ paragraph: "Monter d'abord les paquets, TOUS à la même version — ils sont verrouillés ensemble : `npm install nodefony@<version> @nodefony/<paquet>@<version>…`." + (channel !== null && channel !== "latest" ? ` Pour une préversion, le canal \`${channel}\` désigne la dernière publiée.` : "")
31
+ },
32
+ {
33
+ title: "CE QU'ELLE REJOUE",
34
+ paragraph: "Quatre gestes que `npm install` ne fait pas : le bloc framework d'`AGENTS.md` (entre ses marqueurs — le texte autour n'est pas touché), les pointeurs des skills d'agent (`ai:sync`, nouveaux skills compris), les copies livrées par les paquets restées intactes (`scaffold:sync --update` ; une copie retouchée est gardée et nommée), et `.env.example` (`env --example`). Elle ne démarre pas l'application et n'installe rien."
35
+ },
36
+ {
37
+ title: "FICHIERS POSÉS",
38
+ paragraph: "Un paquet ne pose ses fichiers que si l'application en déclare l'usage : `@nodefony/security` pose le décor Keycloak (`docker/keycloak/`) parce que le `compose.yaml` le monte — y compris sous un profil jamais démarré. Retirer le service du compose suffit à ne plus le recevoir ; le rapport range chaque fichier sous son paquet, `+` créé, `~` rafraîchi."
39
+ }
40
+ ],
41
+ options: [
42
+ {
43
+ term: "--check",
44
+ text: "dit ce qui est en retard sans rien écrire ; sort en 1 si quelque chose l'est"
45
+ },
46
+ {
47
+ term: "--dry-run",
48
+ text: "le plan, sans rien écrire (sort en 0)"
49
+ },
50
+ {
51
+ term: "--json",
52
+ text: "le même rapport, exploitable par un script"
53
+ },
54
+ {
55
+ term: "--cwd <chemin>",
56
+ text: "point de départ (la racine de l'app est résolue en remontant)"
57
+ }
58
+ ],
59
+ examples: [{
60
+ term: `npm install ${packageSpec("nodefony", frameworkVersion)} ${packageSpec("@nodefony/http", frameworkVersion)} … && nodefony upgrade`,
61
+ text: "monter de version, puis remettre l'application au niveau"
62
+ }, {
63
+ term: "nodefony upgrade --check",
64
+ text: "en intégration continue : refuser une app en retard sur ses paquets"
65
+ }],
66
+ exitCodes: [{
67
+ term: "1",
68
+ text: "en retard (--check), ou une contribution a échoué"
69
+ }, {
70
+ term: "66",
71
+ text: "aucune application ici (EX_NOINPUT)"
72
+ }]
73
+ };
74
+ }
12
75
  /** La page d'aide — `nodefony upgrade --help`, et le rappel après un refus. */
13
- const UPGRADE_USAGE = {
14
- command: "nodefony upgrade",
15
- tagline: "remet l'application au niveau de la version de Nodefony installée, après une montée de version",
16
- sections: [
17
- {
18
- title: "AVANT",
19
- paragraph: "Monter d'abord les paquets, TOUS à la même version — ils sont verrouillés ensemble : `npm install nodefony@<version> @nodefony/<paquet>@<version>…`. Pendant la série 10, le tag `beta` désigne la dernière préversion ; `latest` sert encore l'ancienne lignée 7."
20
- },
21
- {
22
- title: "CE QU'ELLE REJOUE",
23
- paragraph: "Quatre gestes que `npm install` ne fait pas : le bloc framework d'`AGENTS.md` (entre ses marqueurs — le texte autour n'est pas touché), les pointeurs des skills d'agent (`ai:sync`, nouveaux skills compris), les copies livrées par les paquets restées intactes (`scaffold:sync --update` ; une copie retouchée est gardée et nommée), et `.env.example` (`env --example`). Elle ne démarre pas l'application et n'installe rien."
24
- },
25
- {
26
- title: "FICHIERS POSÉS",
27
- paragraph: "Un paquet ne pose ses fichiers que si l'application en déclare l'usage : `@nodefony/security` pose le décor Keycloak (`docker/keycloak/`) parce que le `compose.yaml` le monte — y compris sous un profil jamais démarré. Retirer le service du compose suffit à ne plus le recevoir ; le rapport range chaque fichier sous son paquet, `+` créé, `~` rafraîchi."
28
- }
29
- ],
30
- options: [
31
- {
32
- term: "--check",
33
- text: "dit ce qui est en retard sans rien écrire ; sort en 1 si quelque chose l'est"
34
- },
35
- {
36
- term: "--dry-run",
37
- text: "le plan, sans rien écrire (sort en 0)"
38
- },
39
- {
40
- term: "--json",
41
- text: "le même rapport, exploitable par un script"
42
- },
43
- {
44
- term: "--cwd <chemin>",
45
- text: "point de départ (la racine de l'app est résolue en remontant)"
46
- }
47
- ],
48
- examples: [{
49
- term: "npm install nodefony@beta @nodefony/http@beta … && nodefony upgrade",
50
- text: "monter de version, puis remettre l'application au niveau"
51
- }, {
52
- term: "nodefony upgrade --check",
53
- text: "en intégration continue : refuser une app en retard sur ses paquets"
54
- }],
55
- exitCodes: [{
56
- term: "1",
57
- text: "en retard (--check), ou une contribution a échoué"
58
- }, {
59
- term: "66",
60
- text: "aucune application ici (EX_NOINPUT)"
61
- }]
62
- };
76
+ const UPGRADE_USAGE = upgradeUsage(version);
63
77
  /** Fichiers livrés listés à l'écran avant de résumer le reste. */
64
78
  const SHOWN_FILES = 8;
65
79
  /**
@@ -208,4 +222,4 @@ async function runUpgradeCommand(argv) {
208
222
  if (report.contributions.some((c) => c.error !== null)) return 1;
209
223
  return parsed.check && isUpgradePending(report) ? 1 : 0;
210
224
  }
211
- export { UPGRADE_USAGE, isUpgradePending, parseUpgradeArgv, renderUpgrade, runUpgrade, runUpgradeCommand };
225
+ export { UPGRADE_USAGE, isUpgradePending, parseUpgradeArgv, renderUpgrade, runUpgrade, runUpgradeCommand, upgradeUsage };
@@ -1,10 +1,10 @@
1
+ import path from "node:path";
2
+ import fs from "node:fs";
3
+ import fsp from "node:fs/promises";
1
4
  import Service from "../Service.js";
2
5
  import { extend, typeOf } from "../Tools.js";
3
6
  import FileClass from "../FileClass.js";
4
7
  import File from "../finder/File.js";
5
- import fs from "node:fs";
6
- import path from "node:path";
7
- import fsp from "node:fs/promises";
8
8
  import { Eta } from "eta";
9
9
  // src/command/Builder.ts
10
10
  const etaOptions = {
@@ -1,8 +1,8 @@
1
1
  import { chargePrompts } from "../cli/prompts.js";
2
2
  import Service from "../Service.js";
3
+ import { Argument, Command as Command$1, Option } from "commander";
3
4
  import { extend } from "../Tools.js";
4
5
  import { tagCommandAction } from "../kernel/lifecycleTags.js";
5
- import { Argument, Command as Command$1, Option } from "commander";
6
6
  // src/command/Command.ts
7
7
  /**
8
8
  * Les exemples déclarés, rangés par commande Commander — le seul objet que
@@ -1,6 +1,6 @@
1
- import { pathLooksSecret } from "./envOverride.js";
2
1
  import { readFileSync } from "node:fs";
3
2
  import { z } from "zod";
3
+ import { pathLooksSecret } from "./envOverride.js";
4
4
  // src/config/defineEnv.ts
5
5
  /**
6
6
  * `defineEnv` — catalogue de variables d'environnement typé + validé (back-only, D1).
@@ -1,10 +1,10 @@
1
+ import fsp from "node:fs/promises";
2
+ import path from "node:path";
1
3
  import Event from "../Event.js";
2
4
  import { extend, typeOf } from "../Tools.js";
3
5
  import FileResult from "./FileResult.js";
4
6
  import File from "./File.js";
5
7
  import FileClass from "../FileClass.js";
6
- import path from "node:path";
7
- import fsp from "node:fs/promises";
8
8
  // src/finder/Finder.ts
9
9
  const defaultSettings = {
10
10
  recurse: false,
@@ -1,3 +1,5 @@
1
+ import path from "node:path";
2
+ import { inspect } from "node:util";
1
3
  import Syslog from "../syslog/Syslog.js";
2
4
  import "../cli/sysexits.js";
3
5
  import { toImportSpecifier } from "./resolveModuleEntry.js";
@@ -55,8 +57,6 @@ import { runGitHooksCommand } from "../cli/gitHooks.js";
55
57
  import { USAGE_ERROR_CODES, usageHint } from "../cli/usageHint.js";
56
58
  import { isVersionRequest } from "../cli/versionRequest.js";
57
59
  import { version } from "../package.json.js";
58
- import { inspect } from "node:util";
59
- import path from "node:path";
60
60
  // src/kernel/CliKernel.ts
61
61
  const cliOptions = {
62
62
  autoLogger: false,
@@ -1,4 +1,9 @@
1
1
  import { logColor } from "../syslog/logColor.js";
2
+ import cluster from "node:cluster";
3
+ import fs from "node:fs";
4
+ import os from "node:os";
5
+ import path from "node:path";
6
+ import { inspect } from "node:util";
2
7
  import FileClass from "../FileClass.js";
3
8
  import { Nodefony } from "../Nodefony.js";
4
9
  import { DEFAULT_ENGINE_ENVIRONMENT, engineModeOf } from "../runtime/engineEnvironment.js";
@@ -40,11 +45,6 @@ import { KernelReadinessPublisher } from "./kernelReadiness.js";
40
45
  import { KernelLogSetup } from "./kernelLog.js";
41
46
  import { SupervisorLink } from "./supervisorLink.js";
42
47
  import { KernelCluster } from "./kernelCluster.js";
43
- import { inspect } from "node:util";
44
- import cluster from "node:cluster";
45
- import fs from "node:fs";
46
- import os from "node:os";
47
- import path from "node:path";
48
48
  // src/kernel/Kernel.ts
49
49
  const colorLogEvent = () => logColor.cyanBgBlue("EVENT KERNEL");
50
50
  const kernelDefaultOptions = { events: { nbListeners: 60 } };
@@ -1,4 +1,6 @@
1
1
  import { isPlainObject } from "../runtime/isPlainObject.js";
2
+ import { basename, dirname, isAbsolute, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
2
4
  import { toImportSpecifier } from "./resolveModuleEntry.js";
3
5
  import Service from "../Service.js";
4
6
  import Injector from "./injector/injector.js";
@@ -7,11 +9,9 @@ import { extend } from "../Tools.js";
7
9
  import { findOverwrittenLeaves } from "../config/configProvenance.js";
8
10
  import { pathLooksSecret } from "../config/envOverride.js";
9
11
  import { tagListener } from "./lifecycleTags.js";
10
- import { createRequire } from "node:module";
11
12
  import cluster from "node:cluster";
12
- import { basename, dirname, isAbsolute, resolve } from "node:path";
13
13
  import * as fs from "node:fs/promises";
14
- import { fileURLToPath } from "node:url";
14
+ import { createRequire } from "node:module";
15
15
  // src/kernel/Module.ts
16
16
  const regModuleName = /^[Mm]odule-([\w-]+)/u;
17
17
  const controllers = {};
@@ -1,9 +1,9 @@
1
+ import path from "node:path";
2
+ import { existsSync, readFileSync } from "node:fs";
3
+ import { spawn } from "node:child_process";
1
4
  import { portableSpawn } from "../../cli/execPortable.js";
2
5
  import { packageManagerCommandLines, resolvePackageManager } from "../../cli/packageManager.js";
3
6
  import { aggregateOutdated } from "../../cli/outdated.js";
4
- import { existsSync, readFileSync } from "node:fs";
5
- import path from "node:path";
6
- import { spawn } from "node:child_process";
7
7
  // src/kernel/checks/deep.ts
8
8
  /**
9
9
  * Étage 3 de `doctor` — ce que le projet DÉCLARE, réellement exécuté.
@@ -1,3 +1,6 @@
1
+ import path from "node:path";
2
+ import semver from "semver";
3
+ import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
1
4
  import { formatDuration } from "./report.js";
2
5
  import { isSkippedDir, isTestFile } from "./walk.js";
3
6
  import { withoutComments } from "./sourceText.js";
@@ -7,9 +10,6 @@ import { syncSkillPointers } from "../../cli/aiSync.js";
7
10
  import { agentsPresents } from "../../cli/agentTargets.js";
8
11
  import { agentTokenStates, guessOrigin } from "../../cli/aiMcp.js";
9
12
  import { MCP_ENDPOINT_PATH, buildMcpUrl } from "../../cli/aiMcpReport.js";
10
- import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
11
- import path from "node:path";
12
- import semver from "semver";
13
13
  // src/kernel/checks/freshness.ts
14
14
  /**
15
15
  * Contrôle de FRAÎCHEUR — ce qui tourne n'est pas ce qui est écrit.
@@ -1,6 +1,6 @@
1
+ import { spawn } from "node:child_process";
1
2
  import { gateModuleManifest } from "../moduleGating.js";
2
3
  import { engineModeOf } from "../../runtime/engineEnvironment.js";
3
- import { spawn } from "node:child_process";
4
4
  // src/kernel/checks/gating.ts
5
5
  /**
6
6
  * `doctor --env <e>` — ce qui DISPARAÎTRA là-bas, dit depuis ici.
@@ -1,6 +1,6 @@
1
- import { packageManagerCommandLines, resolvePackageManager } from "../../cli/packageManager.js";
2
1
  import { readFileSync } from "node:fs";
3
2
  import path from "node:path";
3
+ import { packageManagerCommandLines, resolvePackageManager } from "../../cli/packageManager.js";
4
4
  // src/kernel/checks/guards.ts
5
5
  /**
6
6
  * `doctor` — les GARDES du projet sont-elles armées ?
@@ -1,5 +1,5 @@
1
- import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
1
  import path from "node:path";
2
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
3
  // src/kernel/checks/lastBoot.ts
4
4
  /**
5
5
  * Le BILAN du dernier démarrage — `var/last-boot.json`.
@@ -1,6 +1,6 @@
1
- import { LOCKFILES, isPackageManagerName, needsWorkspaceProtocol, packageManagerCommandLines, resolvePackageManager } from "../../cli/packageManager.js";
2
- import { existsSync, readFileSync, readdirSync } from "node:fs";
3
1
  import path from "node:path";
2
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
3
+ import { LOCKFILES, isPackageManagerName, needsWorkspaceProtocol, packageManagerCommandLines, resolvePackageManager } from "../../cli/packageManager.js";
4
4
  // src/kernel/checks/managerDrift.ts
5
5
  /**
6
6
  * Le projet est-il cohérent avec SON gestionnaire de paquets ? — règle de
@@ -1,6 +1,6 @@
1
- import { collectSources } from "./walk.js";
2
1
  import { readFileSync, readdirSync, statSync } from "node:fs";
3
2
  import path from "node:path";
3
+ import { collectSources } from "./walk.js";
4
4
  // src/kernel/checks/packageDeps.ts
5
5
  /**
6
6
  * Vérification de la surface d'un paquet : ce qu'il importe, ce qu'il publie.
@@ -1,7 +1,7 @@
1
- import { envForOtherProject, resolveEnvCascade } from "../../runtime/loadEnv.js";
2
- import { checkSurface, entityDialectMismatches } from "./surface.js";
3
1
  import { readFileSync, readdirSync, statSync } from "node:fs";
4
2
  import path from "node:path";
3
+ import { envForOtherProject, resolveEnvCascade } from "../../runtime/loadEnv.js";
4
+ import { checkSurface, entityDialectMismatches } from "./surface.js";
5
5
  // src/kernel/checks/projectScope.ts
6
6
  /**
7
7
  * Le PÉRIMÈTRE d'un projet, et l'environnement qu'il verrait — une seule fois.
@@ -1,3 +1,5 @@
1
+ import path from "node:path";
2
+ import { existsSync, readFileSync } from "node:fs";
1
3
  import { isModulePath, resolveModuleEntry } from "../resolveModuleEntry.js";
2
4
  import { dependencyNames, parsePackageManifest } from "../../cli/scaffold/packageManifest.js";
3
5
  import { buildProjectEnvReport } from "../../cli/env.js";
@@ -5,8 +7,6 @@ import { resolvePortPolicy } from "../../service/dev/devProcess.js";
5
7
  import { balancedBlock, diskManifestReader, readManifestCode, stringLiteralEnd, withoutComments } from "./sourceText.js";
6
8
  import { checkManagerDrift, declaredPackageManager } from "./managerDrift.js";
7
9
  import { packageManagerCommandLines, resolvePackageManager } from "../../cli/packageManager.js";
8
- import { existsSync, readFileSync } from "node:fs";
9
- import path from "node:path";
10
10
  // src/kernel/checks/readiness.ts
11
11
  /**
12
12
  * Ce qui empêchera l'application de DÉMARRER — la troisième famille de `check`.
@@ -1,7 +1,7 @@
1
+ import path from "node:path";
1
2
  import { COUNTED_FAMILIES, FAMILIES, TITLES, countFindings, createPalette, highlightCode, isSubrule, pluralize, preventedChecks, sectionTitle, skippedChecks, splitAction, stateSymbol, subruleParent, summaryLine, wrap } from "./report.js";
2
3
  import { nodeSecurityMessage } from "./nodeSecurity.js";
3
4
  import { formatAge, lastBootFileFor } from "./lastBoot.js";
4
- import path from "node:path";
5
5
  // src/kernel/checks/renderReport.ts
6
6
  /**
7
7
  * Le rapport de `nodefony doctor` tel qu'un HUMAIN le lit — rendu PUR.
@@ -1,6 +1,9 @@
1
+ import path from "node:path";
1
2
  import { ENV_FILE } from "../../runtime/loadEnv.js";
2
3
  import { CACHE_URL_VARIABLES, DATABASE_URL_VARIABLES, readInfraVariable, resolveInfra } from "../../config/infra.js";
3
4
  import { Spinner } from "../../cli/progress.js";
5
+ import { readFileSync, statSync } from "node:fs";
6
+ import { execFileSync } from "node:child_process";
4
7
  import { checkPackageDeps } from "./packageDeps.js";
5
8
  import { checkWiring } from "./wiring.js";
6
9
  import { readLastBoots } from "./lastBoot.js";
@@ -18,9 +21,6 @@ import { FAMILIES, TITLES, countFindings, createPalette, isSubrule, preventedChe
18
21
  import { renderReport } from "./renderReport.js";
19
22
  import { stripGlobalCliFlags } from "../../cli/globalFlags.js";
20
23
  import { isTerminal, terminalSize } from "../../runtime/isTerminal.js";
21
- import { readFileSync, statSync } from "node:fs";
22
- import path from "node:path";
23
- import { execFileSync } from "node:child_process";
24
24
  // src/kernel/checks/runDoctor.ts
25
25
  /**
26
26
  * Exécution STANDALONE de `nodefony doctor` — zéro boot, zéro Kernel.
@@ -1,9 +1,9 @@
1
+ import { readFileSync, statSync } from "node:fs";
2
+ import path from "node:path";
1
3
  import { DATABASE_URL_VARIABLES, readInfraVariable } from "../../config/infra.js";
2
4
  import { isPortableEntitySource } from "../../cli/scaffold/entityFields.js";
3
5
  import { collectSources } from "./walk.js";
4
6
  import { balancedBlock, diskManifestReader, readManifestSources, withoutComments } from "./sourceText.js";
5
- import { readFileSync, statSync } from "node:fs";
6
- import path from "node:path";
7
7
  // src/kernel/checks/surface.ts
8
8
  /**
9
9
  * `doctor` — la SURFACE OUVERTE, et les entités écrites pour un autre moteur.
@@ -1,3 +1,5 @@
1
+ import { readFileSync, statSync } from "node:fs";
2
+ import path from "node:path";
1
3
  import { isInsideRoot } from "../../cli/scaffold/destination.js";
2
4
  import { findReservedEntity } from "../../cli/scaffold/reservedEntities.js";
3
5
  import { ROUTE_PATH_RE } from "../../cli/scaffold/routePaths.js";
@@ -5,8 +7,6 @@ import { isDeclaredDialectDivergence } from "./surface.js";
5
7
  import { collectSources } from "./walk.js";
6
8
  import { extractManifestModuleOrder, findStoreOrderFault, readInstalledStoreManifest, storeOrderFaultMessage } from "../storeManifest.js";
7
9
  import { diskManifestReader, fragmentsWithoutSatisfies, readManifestSources, reservedFragmentFiles, withoutComments } from "./sourceText.js";
8
- import { readFileSync, statSync } from "node:fs";
9
- import path from "node:path";
10
10
  // src/kernel/checks/wiring.ts
11
11
  /**
12
12
  * Contrôle de CÂBLAGE — une classe écrite, mais que rien ne déclare.
@@ -1,6 +1,6 @@
1
+ import { spawn } from "node:child_process";
1
2
  import { portableSpawn } from "../../cli/execPortable.js";
2
3
  import Command from "../../command/Command.js";
3
- import { spawn } from "node:child_process";
4
4
  // src/kernel/commands/BuildCommand.ts
5
5
  const options = {
6
6
  helpGroup: "GÉNÉRER ET CONSTRUIRE",
@@ -1,7 +1,7 @@
1
+ import cluster from "node:cluster";
1
2
  import Command from "../../command/Command.js";
2
3
  import { loadClusterConfig, resolveTopology } from "../../service/cluster/topology.js";
3
4
  import { launchTopology } from "./runtimeLauncher.js";
4
- import cluster from "node:cluster";
5
5
  // src/kernel/commands/ClusterCommand.ts
6
6
  const options = {
7
7
  helpGroup: "LANCER",
@@ -1,8 +1,8 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
1
3
  import Command from "../../command/Command.js";
2
4
  import "../../cli/sysexits.js";
3
5
  import { LicenseInventoryError, NOTICES_FILE, renderNotices, renderReport, surveyLicenses } from "../../cli/licenses.js";
4
- import fs from "node:fs";
5
- import path from "node:path";
6
6
  // src/kernel/commands/LicensesCommand.ts
7
7
  /**
8
8
  * `kernelEvent: "onRegister"` — la commande n'interroge ni le plan
@@ -1,3 +1,6 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { spawnSync } from "node:child_process";
3
+ import path from "node:path";
1
4
  import Command from "../../command/Command.js";
2
5
  import { NPM_SCRIPT_PREFIX, buildInspectMenu, buildStartMenu, filterStartMenu, planMenuAction } from "../../cli/startMenu.js";
3
6
  import { readCliManifest } from "../../cli/completion.js";
@@ -7,9 +10,6 @@ import { resolveColorEnabled } from "../../syslog/logColor.js";
7
10
  import { renderBrand, resolveBrandCharset } from "../../cli/brand.js";
8
11
  import { RESET_SCREEN } from "../../service/dev/outputMode.js";
9
12
  import { terminalSize } from "../../runtime/isTerminal.js";
10
- import { readFileSync } from "node:fs";
11
- import path from "node:path";
12
- import { spawnSync } from "node:child_process";
13
13
  // src/kernel/commands/MenuCommand.ts
14
14
  const options = {
15
15
  helpGroup: "COMPRENDRE",
@@ -1,10 +1,10 @@
1
+ import { execFile } from "node:child_process";
2
+ import { access } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { promisify } from "node:util";
1
5
  import Command from "../../command/Command.js";
2
6
  import "../../cli/sysexits.js";
3
7
  import { aggregateOutdated, formatDependents, formatHeadline, parseNpmOutdatedReport, toTableRows } from "../../cli/outdated.js";
4
- import { promisify } from "node:util";
5
- import path from "node:path";
6
- import { access } from "node:fs/promises";
7
- import { execFile } from "node:child_process";
8
8
  // src/kernel/commands/OutdatedCommand.ts
9
9
  const run = promisify(execFile);
10
10
  /**