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.
- package/.ai/symbols.json +113 -30
- package/CHANGELOG.md +40 -0
- package/README.md +8 -15
- package/assets/login.css +26 -1
- package/dist/bin/nodefony.js +1 -1
- package/dist/client/client/angular/index.js +1 -1
- package/dist/client/client/debugbar/DebugBar.js +2 -2
- package/dist/client/client/react/index.js +1 -1
- package/dist/client/client/sse/NodefonySse.js +1 -1
- package/dist/client/client/svelte/index.js +1 -1
- package/dist/client/client/vue/index.js +1 -1
- package/dist/client/debugbar.standalone.js +3 -3
- package/dist/client/realtime/base64url.js +1 -1
- package/dist/client/realtime/codec/decode.js +1 -1
- package/dist/client/realtime/codec/encode.js +3 -4
- package/dist/client/realtime/throughputProbe.js +1 -1
- package/dist/login/login.css +26 -1
- package/dist/node/Cli.js +6 -6
- package/dist/node/Error.js +3 -3
- package/dist/node/Event.js +1 -1
- package/dist/node/FileClass.js +3 -3
- package/dist/node/Nodefony.js +1 -1
- package/dist/node/bundler/index.js +1 -1
- package/dist/node/cli/agentTargets.js +2 -2
- package/dist/node/cli/aiMcp.js +2 -2
- package/dist/node/cli/aiSync.js +2 -2
- package/dist/node/cli/card.js +2 -2
- package/dist/node/cli/cliFreshness.js +1 -1
- package/dist/node/cli/completion.js +4 -4
- package/dist/node/cli/contributions.js +5 -6
- package/dist/node/cli/create.js +34 -15
- package/dist/node/cli/env.js +4 -4
- package/dist/node/cli/gitHooks.js +3 -3
- package/dist/node/cli/image/index.js +1 -1
- package/dist/node/cli/image/tarLayers.js +1 -1
- package/dist/node/cli/installCommand.js +28 -4
- package/dist/node/cli/installedPackages.js +2 -2
- package/dist/node/cli/licenses.js +3 -3
- package/dist/node/cli/man.js +2 -2
- package/dist/node/cli/manPage.js +1 -1
- package/dist/node/cli/outdated.js +1 -1
- package/dist/node/cli/progress.js +1 -1
- package/dist/node/cli/projectRoot.js +1 -1
- package/dist/node/cli/prompts.js +1 -1
- package/dist/node/cli/scaffold/engine.js +138 -30
- package/dist/node/cli/scaffold/format.js +1 -1
- package/dist/node/cli/scaffold/interactive.js +1 -1
- package/dist/node/cli/scaffold/invisibleChars.js +52 -0
- package/dist/node/cli/scaffold/versions.js +10 -10
- package/dist/node/cli/see.js +3 -3
- package/dist/node/cli/startPanel.js +70 -0
- package/dist/node/cli/symbols.js +2 -2
- package/dist/node/cli/symbolsGenerate.js +3 -3
- package/dist/node/cli/upgrade.js +66 -52
- package/dist/node/command/Builder.js +3 -3
- package/dist/node/command/Command.js +1 -1
- package/dist/node/config/defineEnv.js +1 -1
- package/dist/node/finder/Finder.js +2 -2
- package/dist/node/index.js +1 -1
- package/dist/node/kernel/CliKernel.js +2 -2
- package/dist/node/kernel/Kernel.js +5 -5
- package/dist/node/kernel/Module.js +3 -3
- package/dist/node/kernel/checks/deep.js +3 -3
- package/dist/node/kernel/checks/freshness.js +3 -3
- package/dist/node/kernel/checks/gating.js +1 -1
- package/dist/node/kernel/checks/guards.js +1 -1
- package/dist/node/kernel/checks/lastBoot.js +1 -1
- package/dist/node/kernel/checks/managerDrift.js +2 -2
- package/dist/node/kernel/checks/packageDeps.js +12 -2
- package/dist/node/kernel/checks/projectScope.js +2 -2
- package/dist/node/kernel/checks/readiness.js +2 -2
- package/dist/node/kernel/checks/renderReport.js +1 -1
- package/dist/node/kernel/checks/runDoctor.js +3 -3
- package/dist/node/kernel/checks/surface.js +2 -2
- package/dist/node/kernel/checks/wiring.js +2 -2
- package/dist/node/kernel/commands/BuildCommand.js +1 -1
- package/dist/node/kernel/commands/ClusterCommand.js +1 -1
- package/dist/node/kernel/commands/LicensesCommand.js +2 -2
- package/dist/node/kernel/commands/MenuCommand.js +3 -3
- package/dist/node/kernel/commands/OutdatedCommand.js +4 -4
- package/dist/node/kernel/commands/ProdCommand.js +1 -1
- package/dist/node/kernel/commands/UpgradeCommand.js +1 -1
- package/dist/node/kernel/commands/runtimeLauncher.js +1 -1
- package/dist/node/kernel/decorators/kernelDecorator.js +1 -1
- package/dist/node/kernel/injector/injector.js +1 -1
- package/dist/node/kernel/injector/serviceOrder.js +1 -1
- package/dist/node/kernel/kernelCluster.js +1 -1
- package/dist/node/kernel/kernelLog.js +2 -2
- package/dist/node/kernel/storeManifest.js +2 -2
- package/dist/node/package.json.js +1 -1
- package/dist/node/realtime/base64url.js +1 -1
- package/dist/node/realtime/codec/decode.js +1 -1
- package/dist/node/realtime/codec/encode.js +3 -4
- package/dist/node/realtime/throughputProbe.js +1 -1
- package/dist/node/runtime/loadEnv.js +1 -1
- package/dist/node/runtime/scanPage.js +8 -8
- package/dist/node/service/cluster/ClusterManager.js +1 -1
- package/dist/node/service/cluster/clusterMaster.js +1 -1
- package/dist/node/service/cluster/cpuQuota.js +1 -1
- package/dist/node/service/cluster/richProcessProbe.js +1 -1
- package/dist/node/service/cluster/topology.js +1 -1
- package/dist/node/service/dev/BootReporter.js +1 -1
- package/dist/node/service/dev/DevSupervisor.js +5 -5
- package/dist/node/service/dev/DevTerminal.js +1 -1
- package/dist/node/service/dev/clipboard.js +1 -1
- package/dist/node/service/dev/detachedStart.js +5 -5
- package/dist/node/service/dev/devProcess.js +2 -2
- package/dist/node/service/dev/devProjects.js +2 -2
- package/dist/node/service/dev/devStatusReport.js +2 -2
- package/dist/node/service/dev/devStop.js +2 -2
- package/dist/node/service/dev/devTranscript.js +1 -1
- package/dist/node/service/dev/startupScreen.js +1 -1
- package/dist/node/syslog/Syslog.js +1 -1
- package/dist/node/syslog/drivers/ClusterFileLogDriver.js +2 -2
- package/dist/node/syslog/drivers/FileLogDriver.js +1 -1
- package/dist/node/syslog/drivers/builtinLogDrivers.js +1 -1
- package/dist/node/testing/index.js +5 -5
- package/dist/node/testing/stopChildTree.js +1 -1
- package/dist/types/cli/installCommand.d.ts +20 -0
- package/dist/types/cli/scaffold/engine.d.ts +47 -9
- package/dist/types/cli/scaffold/invisibleChars.d.ts +10 -0
- package/dist/types/cli/startPanel.d.ts +75 -0
- package/dist/types/cli/upgrade.d.ts +10 -0
- package/dist/types/kernel/commands/UpgradeCommand.d.ts +1 -1
- package/man/nodefony.1 +1 -1
- package/package.json +9 -9
- package/templates/app/base/README.md.tpl +2 -2
- package/templates/app/base/env.ts.tpl +7 -4
- package/templates/app/base/nodefony.config.ts.tpl +12 -3
- package/templates/app/complete/env.example.tpl +4 -4
- package/templates/app/frontend/angular/frontend/src/accent.css.tpl +7 -39
- package/templates/app/frontend/angular/frontend/src/app/app.component.ts.tpl +276 -25
- package/templates/app/frontend/react/frontend/src/App.tsx.tpl +313 -44
- package/templates/app/frontend/react/frontend/src/accent.css.tpl +7 -35
- package/templates/app/frontend/shared/frontend/src/brand.ts.tpl +12 -9
- package/templates/app/frontend/shared/frontend/src/devHome.ts.tpl +45 -0
- package/templates/app/frontend/shared/frontend/src/homeContent.ts.tpl +229 -0
- package/templates/app/frontend/shared/frontend/src/homeEffects.ts.tpl +115 -0
- package/templates/app/frontend/shared/frontend/src/showcase.css.tpl +729 -205
- package/templates/app/frontend/shared/nodefony/controllers/AppController.ts.tpl +17 -7
- package/templates/app/frontend/svelte/frontend/src/App.svelte.tpl +248 -29
- package/templates/app/frontend/svelte/frontend/src/accent.css.tpl +7 -39
- package/templates/app/frontend/vue/frontend/src/App.vue.tpl +255 -28
- package/templates/app/frontend/vue/frontend/src/accent.css.tpl +7 -39
- package/templates/app/home/nodefony/controllers/HomeController.ts.tpl +40 -25
- package/templates/app/home/nodefony/home/homePage.ts.tpl +163 -0
- package/templates/controller/duplex/nodefony/controllers/__NAME__.ts.tpl +1 -1
- package/templates/controller/realtime/nodefony/controllers/__NAME__.ts.tpl +1 -1
- package/templates/controller/rest/nodefony/controllers/__NAME__.ts.tpl +1 -1
- package/templates/demo/front/frontend/src/App.tsx.tpl +57 -84
- package/templates/demo/front/frontend/src/demo.css.tpl +12 -134
- package/templates/demo/front/frontend/src/effects.ts.tpl +5 -36
- package/templates/entity/controller/nodefony/controllers/__PASCAL__Controller.ts.tpl +1 -1
- package/templates/demo/front/frontend/src/debugBar.ts.tpl +0 -56
- 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
|
/**
|
package/dist/node/Error.js
CHANGED
|
@@ -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,
|
package/dist/node/Event.js
CHANGED
package/dist/node/FileClass.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
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
|
|
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`);
|
package/dist/node/Nodefony.js
CHANGED
|
@@ -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.
|
package/dist/node/cli/aiMcp.js
CHANGED
|
@@ -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.
|
package/dist/node/cli/aiSync.js
CHANGED
|
@@ -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 = {
|
package/dist/node/cli/card.js
CHANGED
|
@@ -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
|
-
|
|
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
|
}
|
package/dist/node/cli/create.js
CHANGED
|
@@ -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 {
|
|
14
|
+
import { styleText } from "node:util";
|
|
15
|
+
import { demoAppCommand } from "./installCommand.js";
|
|
12
16
|
import { findProjectRoot } from "./projectRoot.js";
|
|
13
|
-
import {
|
|
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}/
|
|
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
|
|
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(
|
|
1379
|
+
process.stdout.write(`🗄️ migration initiale : ${migration.note}\n`);
|
|
1378
1380
|
}
|
|
1379
1381
|
}
|
|
1380
|
-
process.stdout.write(
|
|
1381
|
-
process.stdout.write(
|
|
1382
|
-
process.stdout.write(
|
|
1383
|
-
process.stdout.write(
|
|
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
|
|
1408
|
-
|
|
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
|
/**
|
package/dist/node/cli/env.js
CHANGED
|
@@ -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$
|
|
70
|
-
const
|
|
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
|
-
|
|
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.
|
package/dist/node/cli/man.js
CHANGED
|
@@ -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 = {
|
package/dist/node/cli/manPage.js
CHANGED
|
@@ -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
|
package/dist/node/cli/prompts.js
CHANGED
|
@@ -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(() => {},
|
|
44
|
+
const timer = setInterval(() => {}, 0x7fffffff);
|
|
45
45
|
return () => clearInterval(timer);
|
|
46
46
|
}
|
|
47
47
|
/**
|