nodefony 7.0.2 → 10.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ai/symbols.json +36135 -0
- package/LICENSE +544 -0
- package/README.md +316 -694
- package/bin/nodefony +2183 -85
- package/dist/client/Container.js +367 -0
- package/dist/client/Event.js +198 -0
- package/dist/client/Service.js +344 -0
- package/dist/client/Tools.js +162 -0
- package/dist/client/client/ClientKernel.js +276 -0
- package/dist/client/client/angular/index.js +352 -0
- package/dist/client/client/announce.js +212 -0
- package/dist/client/client/debugbar/DebugBar.js +1624 -0
- package/dist/client/client/debugbar/format.js +103 -0
- package/dist/client/client/debugbar/hmr.js +37 -0
- package/dist/client/client/debugbar/index.js +29 -0
- package/dist/client/client/debugbar/model.js +133 -0
- package/dist/client/client/debugbar/network.js +173 -0
- package/dist/client/client/debugbar/profile.js +114 -0
- package/dist/client/client/index.js +34 -0
- package/dist/client/client/react/index.js +268 -0
- package/dist/client/client/realtime/AdaptiveRate.js +240 -0
- package/dist/client/client/realtime/BrowserWsTransport.js +57 -0
- package/dist/client/client/realtime/RealtimeClient.js +898 -0
- package/dist/client/client/realtime/localEvents.js +56 -0
- package/dist/client/client/realtime/notice.js +125 -0
- package/dist/client/client/realtime/observe.js +280 -0
- package/dist/client/client/roles/index.js +3 -0
- package/dist/client/client/roles/registry.js +97 -0
- package/dist/client/client/roles/roles.js +91 -0
- package/dist/client/client/shim/events.js +88 -0
- package/dist/client/client/shim/util.js +20 -0
- package/dist/client/client/svelte/index.js +319 -0
- package/dist/client/client/syslog/context.js +122 -0
- package/dist/client/client/syslog/errors.js +49 -0
- package/dist/client/client/syslog/uplink.js +106 -0
- package/dist/client/client/vue/index.js +321 -0
- package/dist/client/colors.js +63 -0
- package/dist/client/debugbar.standalone.js +4274 -0
- package/dist/client/realtime/IRealtimeTransport.js +32 -0
- package/dist/client/realtime/JsonRpcPeer.js +251 -0
- package/dist/client/realtime/channelRate.js +39 -0
- package/dist/client/realtime/platformChannels.js +155 -0
- package/dist/client/syslog/Pdu.js +224 -0
- package/dist/client/syslog/Syslog.js +1159 -0
- package/dist/client/syslog/drivers/pduFlow.js +106 -0
- package/dist/client/syslog/drivers/pduProtocol.js +28 -0
- package/dist/client/syslog/logColor.js +80 -0
- package/dist/client/types/src/Container.d.ts +221 -0
- package/dist/client/types/src/Event.d.ts +171 -0
- package/dist/client/types/src/FileClass.d.ts +184 -0
- package/dist/client/types/src/Service.d.ts +165 -0
- package/dist/client/types/src/Tools.d.ts +116 -0
- package/dist/client/types/src/client/ClientKernel.d.ts +90 -0
- package/dist/client/types/src/client/IClientKernel.d.ts +195 -0
- package/dist/client/types/src/client/angular/index.d.ts +273 -0
- package/dist/client/types/src/client/announce.d.ts +74 -0
- package/dist/client/types/src/client/debugbar/DebugBar.d.ts +279 -0
- package/dist/client/types/src/client/debugbar/format.d.ts +48 -0
- package/dist/client/types/src/client/debugbar/hmr.d.ts +16 -0
- package/dist/client/types/src/client/debugbar/index.d.ts +30 -0
- package/dist/client/types/src/client/debugbar/model.d.ts +158 -0
- package/dist/client/types/src/client/debugbar/network.d.ts +55 -0
- package/dist/client/types/src/client/debugbar/profile.d.ts +99 -0
- package/dist/client/types/src/client/index.d.ts +47 -0
- package/dist/client/types/src/client/react/index.d.ts +207 -0
- package/dist/client/types/src/client/realtime/AdaptiveRate.d.ts +138 -0
- package/dist/client/types/src/client/realtime/BrowserWsTransport.d.ts +27 -0
- package/dist/client/types/src/client/realtime/RealtimeClient.d.ts +573 -0
- package/dist/client/types/src/client/realtime/localEvents.d.ts +53 -0
- package/dist/client/types/src/client/realtime/notice.d.ts +70 -0
- package/dist/client/types/src/client/realtime/observe.d.ts +284 -0
- package/dist/client/types/src/client/roles/index.d.ts +15 -0
- package/dist/client/types/src/client/roles/registry.d.ts +72 -0
- package/dist/client/types/src/client/roles/roles.d.ts +68 -0
- package/dist/client/types/src/client/shim/cli-color.d.ts +2 -0
- package/dist/client/types/src/client/shim/events.d.ts +39 -0
- package/dist/client/types/src/client/shim/util.d.ts +14 -0
- package/dist/client/types/src/client/svelte/index.d.ts +216 -0
- package/dist/client/types/src/client/syslog/context.d.ts +76 -0
- package/dist/client/types/src/client/syslog/errors.d.ts +46 -0
- package/dist/client/types/src/client/syslog/uplink.d.ts +89 -0
- package/dist/client/types/src/client/transport/websocket.d.ts +5 -0
- package/dist/client/types/src/client/vue/index.d.ts +234 -0
- package/dist/client/types/src/colors.d.ts +32 -0
- package/dist/client/types/src/config/infra.d.ts +171 -0
- package/dist/client/types/src/kernel/bootReport.d.ts +112 -0
- package/dist/client/types/src/kernel/readinessRegistry.d.ts +104 -0
- package/dist/client/types/src/realtime/IRealtimeSocket.d.ts +142 -0
- package/dist/client/types/src/realtime/IRealtimeTransport.d.ts +50 -0
- package/dist/client/types/src/realtime/JsonRpcPeer.d.ts +251 -0
- package/dist/client/types/src/realtime/RealtimeEventMap.d.ts +269 -0
- package/dist/client/types/src/realtime/channelRate.d.ts +55 -0
- package/dist/client/types/src/realtime/platformChannels.d.ts +147 -0
- package/dist/client/types/src/syslog/Pdu.d.ts +134 -0
- package/dist/client/types/src/syslog/Syslog.d.ts +482 -0
- package/dist/client/types/src/syslog/drivers/ILogDriver.d.ts +177 -0
- package/dist/client/types/src/syslog/drivers/pduFlow.d.ts +53 -0
- package/dist/client/types/src/syslog/drivers/pduProtocol.d.ts +20 -0
- package/dist/client/types/src/syslog/logColor.d.ts +59 -0
- package/dist/client/types/src/types/ICliKernel.d.ts +28 -0
- package/dist/client/types/src/types/ICommand.d.ts +14 -0
- package/dist/client/types/src/types/IContainer.d.ts +35 -0
- package/dist/client/types/src/types/IKernel.d.ts +138 -0
- package/dist/client/types/src/types/IMcpTool.d.ts +157 -0
- package/dist/client/types/src/types/IModule.d.ts +73 -0
- package/dist/client/types/src/types/IPage.d.ts +119 -0
- package/dist/client/types/src/types/IService.d.ts +62 -0
- package/dist/client/types/src/types/ISyslog.d.ts +58 -0
- package/dist/client/types/src/types/ITransport.d.ts +5 -0
- package/dist/client/types/src/types/globals.d.ts +47 -0
- package/dist/node/Cli.js +750 -0
- package/dist/node/Container.js +367 -0
- package/dist/node/Error.js +309 -0
- package/dist/node/Event.js +198 -0
- package/dist/node/FileClass.js +308 -0
- package/dist/node/Nodefony.js +78 -0
- package/dist/node/Service.js +344 -0
- package/dist/node/Tools.js +205 -0
- package/dist/node/bin/resolveLocalCli.js +10 -0
- package/dist/node/bundler/index.js +103 -0
- package/dist/node/cli/agentTargets.js +461 -0
- package/dist/node/cli/aiMcp.js +553 -0
- package/dist/node/cli/aiMcpReport.js +129 -0
- package/dist/node/cli/aiSync.js +323 -0
- package/dist/node/cli/aiSyncReport.js +142 -0
- package/dist/node/cli/card.js +186 -0
- package/dist/node/cli/cardReport.js +110 -0
- package/dist/node/cli/completion.js +415 -0
- package/dist/node/cli/create.js +805 -0
- package/dist/node/cli/env.js +332 -0
- package/dist/node/cli/envReport.js +159 -0
- package/dist/node/cli/execPortable.js +60 -0
- package/dist/node/cli/gitHooks.js +191 -0
- package/dist/node/cli/gitHooksReport.js +119 -0
- package/dist/node/cli/globalFlags.js +67 -0
- package/dist/node/cli/helpReport.js +288 -0
- package/dist/node/cli/manPage.js +165 -0
- package/dist/node/cli/nodefonyBin.js +61 -0
- package/dist/node/cli/outdated.js +144 -0
- package/dist/node/cli/progress.js +555 -0
- package/dist/node/cli/projectRoot.js +32 -0
- package/dist/node/cli/promptPassword.js +44 -0
- package/dist/node/cli/prompts.js +86 -0
- package/dist/node/cli/scaffold/destination.js +92 -0
- package/dist/node/cli/scaffold/engine.js +2156 -0
- package/dist/node/cli/scaffold/entityFields.js +589 -0
- package/dist/node/cli/scaffold/format.js +243 -0
- package/dist/node/cli/scaffold/interactive.js +124 -0
- package/dist/node/cli/scaffold/moduleLayout.js +38 -0
- package/dist/node/cli/scaffold/reservedEntities.js +74 -0
- package/dist/node/cli/scaffold/spec.js +704 -0
- package/dist/node/cli/scaffold/steps.js +40 -0
- package/dist/node/cli/scaffold/userContractSource.js +133 -0
- package/dist/node/cli/scaffold/versions.js +57 -0
- package/dist/node/cli/scaffold/writer.js +172 -0
- package/dist/node/cli/startMenu.js +496 -0
- package/dist/node/cli/symbols.js +205 -0
- package/dist/node/cli/sysexits.js +34 -0
- package/dist/node/cli/tableReport.js +184 -0
- package/dist/node/cli/usageReport.js +144 -0
- package/dist/node/colors.js +63 -0
- package/dist/node/command/Builder.js +153 -0
- package/dist/node/command/Command.js +348 -0
- package/dist/node/config/configProvenance.js +101 -0
- package/dist/node/config/defaults.js +39 -0
- package/dist/node/config/defineConfig.js +129 -0
- package/dist/node/config/defineEnv.js +264 -0
- package/dist/node/config/envExample.js +41 -0
- package/dist/node/config/envOverride.js +423 -0
- package/dist/node/config/infra.js +163 -0
- package/dist/node/config/reactivity.js +23 -0
- package/dist/node/config/reservedEnv.js +118 -0
- package/dist/node/config/schema.js +134 -0
- package/dist/node/config/use.js +24 -0
- package/dist/node/finder/File.js +49 -0
- package/dist/node/finder/FileResult.js +86 -0
- package/dist/node/finder/Finder.js +201 -0
- package/dist/node/finder/Result.js +45 -0
- package/dist/node/index.js +121 -0
- package/dist/node/kernel/BootConfigurationError.js +54 -0
- package/dist/node/kernel/CliKernel.js +630 -0
- package/dist/node/kernel/Kernel.js +2198 -0
- package/dist/node/kernel/Module.js +453 -0
- package/dist/node/kernel/adminPlane/adminCaller.js +98 -0
- package/dist/node/kernel/adminPlane/adminRbac.js +51 -0
- package/dist/node/kernel/adminPlane/catalog.js +158 -0
- package/dist/node/kernel/adminPlane/executeAdmin.js +78 -0
- package/dist/node/kernel/checks/deep.js +335 -0
- package/dist/node/kernel/checks/freshness.js +139 -0
- package/dist/node/kernel/checks/gating.js +231 -0
- package/dist/node/kernel/checks/guards.js +232 -0
- package/dist/node/kernel/checks/lastBoot.js +136 -0
- package/dist/node/kernel/checks/live.js +330 -0
- package/dist/node/kernel/checks/packageDeps.js +292 -0
- package/dist/node/kernel/checks/readiness.js +153 -0
- package/dist/node/kernel/checks/renderReport.js +780 -0
- package/dist/node/kernel/checks/report.js +421 -0
- package/dist/node/kernel/checks/runDoctor.js +731 -0
- package/dist/node/kernel/checks/surface.js +364 -0
- package/dist/node/kernel/checks/walk.js +100 -0
- package/dist/node/kernel/checks/wiring.js +450 -0
- package/dist/node/kernel/commands/AiMcpCommand.js +65 -0
- package/dist/node/kernel/commands/AiSyncCommand.js +48 -0
- package/dist/node/kernel/commands/BuildCommand.js +49 -0
- package/dist/node/kernel/commands/CardCommand.js +50 -0
- package/dist/node/kernel/commands/ClusterCommand.js +58 -0
- package/dist/node/kernel/commands/CompletionCommand.js +31 -0
- package/dist/node/kernel/commands/CreateCommand.js +45 -0
- package/dist/node/kernel/commands/DevCommand.js +99 -0
- package/dist/node/kernel/commands/DoctorCommand.js +115 -0
- package/dist/node/kernel/commands/EnvCommand.js +52 -0
- package/dist/node/kernel/commands/GitHooksCommand.js +47 -0
- package/dist/node/kernel/commands/InspectCommand.js +153 -0
- package/dist/node/kernel/commands/InstallCommand.js +20 -0
- package/dist/node/kernel/commands/MenuCommand.js +261 -0
- package/dist/node/kernel/commands/OutdatedCommand.js +164 -0
- package/dist/node/kernel/commands/ProdCommand.js +60 -0
- package/dist/node/kernel/commands/StatusCommand.js +30 -0
- package/dist/node/kernel/commands/StopCommand.js +35 -0
- package/dist/node/kernel/commands/SymbolsCommand.js +45 -0
- package/dist/node/kernel/commands/runtimeLauncher.js +95 -0
- package/dist/node/kernel/decorators/kernelDecorator.js +110 -0
- package/dist/node/kernel/injector/injector.js +137 -0
- package/dist/node/kernel/injector/serviceOrder.js +106 -0
- package/dist/node/kernel/inspect/adminSubjects.js +194 -0
- package/dist/node/kernel/inspect/docOutline.js +86 -0
- package/dist/node/kernel/lifecycleTags.js +76 -0
- package/dist/node/kernel/moduleConfig.js +75 -0
- package/dist/node/kernel/moduleGating.js +68 -0
- package/dist/node/kernel/readinessRegistry.js +98 -0
- package/dist/node/kernel/resolveModuleEntry.js +61 -0
- package/dist/node/mcp/caller.js +40 -0
- package/dist/node/mcp/guard.js +51 -0
- package/dist/node/mcp/protocol.js +157 -0
- package/dist/node/mcp/server.js +216 -0
- package/dist/node/mcp/tools.js +861 -0
- package/dist/node/oauth/authorizationServer.js +221 -0
- package/dist/node/oauth/protectedResource.js +293 -0
- package/dist/node/package.js +4 -0
- package/dist/node/realtime/IRealtimeTransport.js +32 -0
- package/dist/node/realtime/JsonRpcPeer.js +251 -0
- package/dist/node/realtime/RealtimeEventMap.js +15 -0
- package/dist/node/realtime/channelRate.js +39 -0
- package/dist/node/realtime/platformChannels.js +155 -0
- package/dist/node/runtime/GcScheduler.js +92 -0
- package/dist/node/runtime/RequestContext.js +76 -0
- package/dist/node/runtime/bearer.js +84 -0
- package/dist/node/runtime/engineEnvironment.js +79 -0
- package/dist/node/runtime/loadEnv.js +105 -0
- package/dist/node/runtime/pageFacets.js +85 -0
- package/dist/node/runtime/pageFilters.js +103 -0
- package/dist/node/runtime/pageGuard.js +84 -0
- package/dist/node/runtime/pageQuery.js +160 -0
- package/dist/node/runtime/pageSort.js +114 -0
- package/dist/node/runtime/redact.js +43 -0
- package/dist/node/runtime/withTimeout.js +71 -0
- package/dist/node/service/cluster/ClusterManager.js +202 -0
- package/dist/node/service/cluster/ClusterProbeAggregator.js +120 -0
- package/dist/node/service/cluster/ClusterRelay.js +74 -0
- package/dist/node/service/cluster/clusterMaster.js +65 -0
- package/dist/node/service/cluster/clusterMessage.js +70 -0
- package/dist/node/service/cluster/cpuQuota.js +59 -0
- package/dist/node/service/cluster/instanceProbe.js +52 -0
- package/dist/node/service/cluster/podEnvironment.js +48 -0
- package/dist/node/service/cluster/processProbe.js +70 -0
- package/dist/node/service/cluster/richProcessProbe.js +115 -0
- package/dist/node/service/cluster/topology.js +71 -0
- package/dist/node/service/dev/BootReporter.js +490 -0
- package/dist/node/service/dev/DevSupervisor.js +1004 -0
- package/dist/node/service/dev/bootVerdict.js +158 -0
- package/dist/node/service/dev/detachedStart.js +372 -0
- package/dist/node/service/dev/devProcess.js +1137 -0
- package/dist/node/service/dev/devProjects.js +138 -0
- package/dist/node/service/dev/devStatusReport.js +395 -0
- package/dist/node/service/dev/devStop.js +263 -0
- package/dist/node/service/fetchService.js +35 -0
- package/dist/node/service/gitService.js +62 -0
- package/dist/node/syslog/Pdu.js +224 -0
- package/dist/node/syslog/Syslog.js +1159 -0
- package/dist/node/syslog/drivers/ClusterFileLogDriver.js +114 -0
- package/dist/node/syslog/drivers/FileLogDriver.js +127 -0
- package/dist/node/syslog/drivers/ILogDriver.js +26 -0
- package/dist/node/syslog/drivers/LokiLogDriver.js +144 -0
- package/dist/node/syslog/drivers/MemoryLogDriver.js +33 -0
- package/dist/node/syslog/drivers/OpenSearchLogDriver.js +159 -0
- package/dist/node/syslog/drivers/builtinLogDrivers.js +114 -0
- package/dist/node/syslog/drivers/filterPdus.js +71 -0
- package/dist/node/syslog/drivers/logDriverRegistry.js +83 -0
- package/dist/node/syslog/drivers/opensearchShared.js +17 -0
- package/dist/node/syslog/drivers/pduFlow.js +106 -0
- package/dist/node/syslog/drivers/pduProtocol.js +28 -0
- package/dist/node/syslog/httpFetch.js +43 -0
- package/dist/node/syslog/logColor.js +80 -0
- package/dist/node/syslog/sinks/FileSink.js +142 -0
- package/dist/node/syslog/transports/BatchingHttpTransport.js +98 -0
- package/dist/node/syslog/transports/ConsoleTransport.js +14 -0
- package/dist/node/syslog/transports/FileTransport.js +17 -0
- package/dist/node/syslog/transports/HttpTransport.js +44 -0
- package/dist/node/syslog/transports/LokiTransport.js +80 -0
- package/dist/node/syslog/transports/OpenSearchTransport.js +53 -0
- package/dist/node/syslog/transports/SyslogTransport.js +13 -0
- package/dist/node/syslog/transports/index.js +8 -0
- package/dist/node/testing/index.js +190 -0
- package/dist/types/Cli.d.ts +177 -0
- package/dist/types/Container.d.ts +221 -0
- package/dist/types/Error.d.ts +162 -0
- package/dist/types/Event.d.ts +171 -0
- package/dist/types/FileClass.d.ts +184 -0
- package/dist/types/Nodefony.d.ts +66 -0
- package/dist/types/Service.d.ts +165 -0
- package/dist/types/Tools.d.ts +116 -0
- package/dist/types/bin/resolveLocalCli.d.ts +49 -0
- package/dist/types/bundler/index.d.ts +66 -0
- package/dist/types/cli/agentTargets.d.ts +378 -0
- package/dist/types/cli/aiMcp.d.ts +239 -0
- package/dist/types/cli/aiMcpReport.d.ts +113 -0
- package/dist/types/cli/aiSync.d.ts +68 -0
- package/dist/types/cli/aiSyncReport.d.ts +149 -0
- package/dist/types/cli/card.d.ts +49 -0
- package/dist/types/cli/cardReport.d.ts +127 -0
- package/dist/types/cli/completion.d.ts +154 -0
- package/dist/types/cli/create.d.ts +177 -0
- package/dist/types/cli/env.d.ts +103 -0
- package/dist/types/cli/envReport.d.ts +153 -0
- package/dist/types/cli/execPortable.d.ts +54 -0
- package/dist/types/cli/gitHooks.d.ts +48 -0
- package/dist/types/cli/gitHooksReport.d.ts +101 -0
- package/dist/types/cli/globalFlags.d.ts +48 -0
- package/dist/types/cli/helpReport.d.ts +110 -0
- package/dist/types/cli/manPage.d.ts +21 -0
- package/dist/types/cli/nodefonyBin.d.ts +45 -0
- package/dist/types/cli/outdated.d.ts +119 -0
- package/dist/types/cli/progress.d.ts +349 -0
- package/dist/types/cli/projectRoot.d.ts +19 -0
- package/dist/types/cli/promptPassword.d.ts +22 -0
- package/dist/types/cli/prompts.d.ts +102 -0
- package/dist/types/cli/scaffold/destination.d.ts +70 -0
- package/dist/types/cli/scaffold/engine.d.ts +545 -0
- package/dist/types/cli/scaffold/entityFields.d.ts +238 -0
- package/dist/types/cli/scaffold/format.d.ts +78 -0
- package/dist/types/cli/scaffold/interactive.d.ts +11 -0
- package/dist/types/cli/scaffold/moduleLayout.d.ts +69 -0
- package/dist/types/cli/scaffold/reservedEntities.d.ts +49 -0
- package/dist/types/cli/scaffold/spec.d.ts +159 -0
- package/dist/types/cli/scaffold/steps.d.ts +24 -0
- package/dist/types/cli/scaffold/userContractSource.d.ts +86 -0
- package/dist/types/cli/scaffold/versions.d.ts +14 -0
- package/dist/types/cli/scaffold/writer.d.ts +100 -0
- package/dist/types/cli/startMenu.d.ts +195 -0
- package/dist/types/cli/symbols.d.ts +84 -0
- package/dist/types/cli/sysexits.d.ts +31 -0
- package/dist/types/cli/tableReport.d.ts +44 -0
- package/dist/types/cli/usageReport.d.ts +108 -0
- package/dist/types/client/ClientKernel.d.ts +90 -0
- package/dist/types/client/IClientKernel.d.ts +195 -0
- package/dist/types/client/angular/index.d.ts +273 -0
- package/dist/types/client/announce.d.ts +74 -0
- package/dist/types/client/debugbar/DebugBar.d.ts +279 -0
- package/dist/types/client/debugbar/format.d.ts +48 -0
- package/dist/types/client/debugbar/hmr.d.ts +16 -0
- package/dist/types/client/debugbar/index.d.ts +30 -0
- package/dist/types/client/debugbar/model.d.ts +158 -0
- package/dist/types/client/debugbar/network.d.ts +55 -0
- package/dist/types/client/debugbar/profile.d.ts +99 -0
- package/dist/types/client/index.d.ts +47 -0
- package/dist/types/client/react/index.d.ts +207 -0
- package/dist/types/client/realtime/AdaptiveRate.d.ts +138 -0
- package/dist/types/client/realtime/BrowserWsTransport.d.ts +27 -0
- package/dist/types/client/realtime/RealtimeClient.d.ts +573 -0
- package/dist/types/client/realtime/localEvents.d.ts +53 -0
- package/dist/types/client/realtime/notice.d.ts +70 -0
- package/dist/types/client/realtime/observe.d.ts +284 -0
- package/dist/types/client/roles/index.d.ts +15 -0
- package/dist/types/client/roles/registry.d.ts +72 -0
- package/dist/types/client/roles/roles.d.ts +68 -0
- package/dist/types/client/shim/cli-color.d.ts +2 -0
- package/dist/types/client/shim/events.d.ts +39 -0
- package/dist/types/client/shim/util.d.ts +14 -0
- package/dist/types/client/svelte/index.d.ts +216 -0
- package/dist/types/client/syslog/context.d.ts +76 -0
- package/dist/types/client/syslog/errors.d.ts +46 -0
- package/dist/types/client/syslog/uplink.d.ts +89 -0
- package/dist/types/client/transport/websocket.d.ts +5 -0
- package/dist/types/client/vue/index.d.ts +234 -0
- package/dist/types/colors.d.ts +32 -0
- package/dist/types/command/Builder.d.ts +47 -0
- package/dist/types/command/Command.d.ts +268 -0
- package/dist/types/config/configMeta.d.ts +53 -0
- package/dist/types/config/configProvenance.d.ts +58 -0
- package/dist/types/config/defaults.d.ts +33 -0
- package/dist/types/config/defineConfig.d.ts +70 -0
- package/dist/types/config/defineEnv.d.ts +170 -0
- package/dist/types/config/envExample.d.ts +23 -0
- package/dist/types/config/envOverride.d.ts +236 -0
- package/dist/types/config/index.d.ts +23 -0
- package/dist/types/config/infra.d.ts +171 -0
- package/dist/types/config/reactivity.d.ts +36 -0
- package/dist/types/config/reservedEnv.d.ts +145 -0
- package/dist/types/config/schema.d.ts +113 -0
- package/dist/types/config/types.d.ts +374 -0
- package/dist/types/config/use.d.ts +80 -0
- package/dist/types/finder/File.d.ts +26 -0
- package/dist/types/finder/FileResult.d.ts +14 -0
- package/dist/types/finder/Finder.d.ts +51 -0
- package/dist/types/finder/Result.d.ts +10 -0
- package/dist/types/index.d.ts +205 -0
- package/dist/types/kernel/BootConfigurationError.d.ts +50 -0
- package/dist/types/kernel/CliKernel.d.ts +289 -0
- package/dist/types/kernel/Kernel.d.ts +1255 -0
- package/dist/types/kernel/Module.d.ts +326 -0
- package/dist/types/kernel/adminPlane/adminCaller.d.ts +105 -0
- package/dist/types/kernel/adminPlane/adminRbac.d.ts +44 -0
- package/dist/types/kernel/adminPlane/catalog.d.ts +122 -0
- package/dist/types/kernel/adminPlane/executeAdmin.d.ts +99 -0
- package/dist/types/kernel/bootReport.d.ts +112 -0
- package/dist/types/kernel/checks/deep.d.ts +122 -0
- package/dist/types/kernel/checks/freshness.d.ts +49 -0
- package/dist/types/kernel/checks/gating.d.ts +134 -0
- package/dist/types/kernel/checks/guards.d.ts +57 -0
- package/dist/types/kernel/checks/lastBoot.d.ts +189 -0
- package/dist/types/kernel/checks/live.d.ts +110 -0
- package/dist/types/kernel/checks/packageDeps.d.ts +44 -0
- package/dist/types/kernel/checks/readiness.d.ts +97 -0
- package/dist/types/kernel/checks/renderReport.d.ts +107 -0
- package/dist/types/kernel/checks/report.d.ts +414 -0
- package/dist/types/kernel/checks/runDoctor.d.ts +361 -0
- package/dist/types/kernel/checks/surface.d.ts +148 -0
- package/dist/types/kernel/checks/walk.d.ts +45 -0
- package/dist/types/kernel/checks/wiring.d.ts +54 -0
- package/dist/types/kernel/commands/AiMcpCommand.d.ts +39 -0
- package/dist/types/kernel/commands/AiSyncCommand.d.ts +28 -0
- package/dist/types/kernel/commands/BuildCommand.d.ts +13 -0
- package/dist/types/kernel/commands/CardCommand.d.ts +34 -0
- package/dist/types/kernel/commands/ClusterCommand.d.ts +29 -0
- package/dist/types/kernel/commands/CompletionCommand.d.ts +17 -0
- package/dist/types/kernel/commands/CreateCommand.d.ts +16 -0
- package/dist/types/kernel/commands/DevCommand.d.ts +40 -0
- package/dist/types/kernel/commands/DoctorCommand.d.ts +55 -0
- package/dist/types/kernel/commands/EnvCommand.d.ts +35 -0
- package/dist/types/kernel/commands/GitHooksCommand.d.ts +27 -0
- package/dist/types/kernel/commands/InspectCommand.d.ts +59 -0
- package/dist/types/kernel/commands/InstallCommand.d.ts +7 -0
- package/dist/types/kernel/commands/MenuCommand.d.ts +58 -0
- package/dist/types/kernel/commands/OutdatedCommand.d.ts +47 -0
- package/dist/types/kernel/commands/ProdCommand.d.ts +29 -0
- package/dist/types/kernel/commands/StatusCommand.d.ts +17 -0
- package/dist/types/kernel/commands/StopCommand.d.ts +17 -0
- package/dist/types/kernel/commands/SymbolsCommand.d.ts +29 -0
- package/dist/types/kernel/commands/runtimeLauncher.d.ts +76 -0
- package/dist/types/kernel/decorators/kernelDecorator.d.ts +76 -0
- package/dist/types/kernel/injector/injector.d.ts +47 -0
- package/dist/types/kernel/injector/serviceOrder.d.ts +29 -0
- package/dist/types/kernel/inspect/adminSubjects.d.ts +169 -0
- package/dist/types/kernel/inspect/docOutline.d.ts +53 -0
- package/dist/types/kernel/lifecycleTags.d.ts +79 -0
- package/dist/types/kernel/moduleConfig.d.ts +35 -0
- package/dist/types/kernel/moduleGating.d.ts +78 -0
- package/dist/types/kernel/readinessRegistry.d.ts +104 -0
- package/dist/types/kernel/resolveModuleEntry.d.ts +46 -0
- package/dist/types/mcp/caller.d.ts +55 -0
- package/dist/types/mcp/guard.d.ts +66 -0
- package/dist/types/mcp/protocol.d.ts +163 -0
- package/dist/types/mcp/server.d.ts +70 -0
- package/dist/types/mcp/tools.d.ts +209 -0
- package/dist/types/oauth/authorizationServer.d.ts +204 -0
- package/dist/types/oauth/protectedResource.d.ts +339 -0
- package/dist/types/realtime/IRealtimeSocket.d.ts +142 -0
- package/dist/types/realtime/IRealtimeTransport.d.ts +50 -0
- package/dist/types/realtime/JsonRpcPeer.d.ts +251 -0
- package/dist/types/realtime/RealtimeEventMap.d.ts +269 -0
- package/dist/types/realtime/channelRate.d.ts +55 -0
- package/dist/types/realtime/platformChannels.d.ts +147 -0
- package/dist/types/runtime/GcScheduler.d.ts +96 -0
- package/dist/types/runtime/RequestContext.d.ts +152 -0
- package/dist/types/runtime/bearer.d.ts +88 -0
- package/dist/types/runtime/engineEnvironment.d.ts +115 -0
- package/dist/types/runtime/loadEnv.d.ts +86 -0
- package/dist/types/runtime/pageFacets.d.ts +104 -0
- package/dist/types/runtime/pageFilters.d.ts +139 -0
- package/dist/types/runtime/pageGuard.d.ts +78 -0
- package/dist/types/runtime/pageQuery.d.ts +138 -0
- package/dist/types/runtime/pageSort.d.ts +86 -0
- package/dist/types/runtime/redact.d.ts +27 -0
- package/dist/types/runtime/withTimeout.d.ts +51 -0
- package/dist/types/service/cluster/ClusterManager.d.ts +112 -0
- package/dist/types/service/cluster/ClusterProbeAggregator.d.ts +68 -0
- package/dist/types/service/cluster/ClusterRelay.d.ts +57 -0
- package/dist/types/service/cluster/clusterMaster.d.ts +40 -0
- package/dist/types/service/cluster/clusterMessage.d.ts +94 -0
- package/dist/types/service/cluster/cpuQuota.d.ts +37 -0
- package/dist/types/service/cluster/instanceProbe.d.ts +82 -0
- package/dist/types/service/cluster/podEnvironment.d.ts +35 -0
- package/dist/types/service/cluster/processProbe.d.ts +53 -0
- package/dist/types/service/cluster/richProcessProbe.d.ts +77 -0
- package/dist/types/service/cluster/topology.d.ts +64 -0
- package/dist/types/service/dev/BootReporter.d.ts +67 -0
- package/dist/types/service/dev/DevSupervisor.d.ts +117 -0
- package/dist/types/service/dev/bootVerdict.d.ts +99 -0
- package/dist/types/service/dev/detachedStart.d.ts +164 -0
- package/dist/types/service/dev/devProcess.d.ts +638 -0
- package/dist/types/service/dev/devProjects.d.ts +121 -0
- package/dist/types/service/dev/devStatusReport.d.ts +141 -0
- package/dist/types/service/dev/devStop.d.ts +57 -0
- package/dist/types/service/fetchService.d.ts +29 -0
- package/dist/types/service/gitService.d.ts +24 -0
- package/dist/types/syslog/Pdu.d.ts +134 -0
- package/dist/types/syslog/Syslog.d.ts +482 -0
- package/dist/types/syslog/drivers/ClusterFileLogDriver.d.ts +40 -0
- package/dist/types/syslog/drivers/FileLogDriver.d.ts +55 -0
- package/dist/types/syslog/drivers/ILogDriver.d.ts +177 -0
- package/dist/types/syslog/drivers/LokiLogDriver.d.ts +44 -0
- package/dist/types/syslog/drivers/MemoryLogDriver.d.ts +20 -0
- package/dist/types/syslog/drivers/OpenSearchLogDriver.d.ts +40 -0
- package/dist/types/syslog/drivers/builtinLogDrivers.d.ts +43 -0
- package/dist/types/syslog/drivers/filterPdus.d.ts +21 -0
- package/dist/types/syslog/drivers/logDriverRegistry.d.ts +100 -0
- package/dist/types/syslog/drivers/opensearchShared.d.ts +11 -0
- package/dist/types/syslog/drivers/pduFlow.d.ts +53 -0
- package/dist/types/syslog/drivers/pduProtocol.d.ts +20 -0
- package/dist/types/syslog/httpFetch.d.ts +48 -0
- package/dist/types/syslog/logColor.d.ts +59 -0
- package/dist/types/syslog/sinks/FileSink.d.ts +78 -0
- package/dist/types/syslog/transports/BatchingHttpTransport.d.ts +59 -0
- package/dist/types/syslog/transports/ConsoleTransport.d.ts +8 -0
- package/dist/types/syslog/transports/FileTransport.d.ts +13 -0
- package/dist/types/syslog/transports/HttpTransport.d.ts +15 -0
- package/dist/types/syslog/transports/LokiTransport.d.ts +45 -0
- package/dist/types/syslog/transports/OpenSearchTransport.d.ts +40 -0
- package/dist/types/syslog/transports/SyslogTransport.d.ts +9 -0
- package/dist/types/syslog/transports/index.d.ts +12 -0
- package/dist/types/testing/index.d.ts +197 -0
- package/dist/types/types/IAdminApi.d.ts +246 -0
- package/dist/types/types/ICliKernel.d.ts +28 -0
- package/dist/types/types/ICommand.d.ts +14 -0
- package/dist/types/types/IContainer.d.ts +35 -0
- package/dist/types/types/IIdempotencyStore.d.ts +159 -0
- package/dist/types/types/IKernel.d.ts +138 -0
- package/dist/types/types/IMcpTool.d.ts +157 -0
- package/dist/types/types/IModule.d.ts +73 -0
- package/dist/types/types/IModuleManifest.d.ts +49 -0
- package/dist/types/types/IPage.d.ts +119 -0
- package/dist/types/types/IService.d.ts +62 -0
- package/dist/types/types/ISyslog.d.ts +58 -0
- package/dist/types/types/ITransport.d.ts +5 -0
- package/dist/types/types/globals.d.ts +47 -0
- package/docs/angular-services.md +318 -0
- package/docs/catalogue.md +184 -0
- package/docs/cli.md +369 -0
- package/docs/client.md +616 -0
- package/docs/debugbar.md +218 -0
- package/docs/environnement.md +308 -0
- package/docs/index.md +388 -0
- package/docs/kernel.md +670 -0
- package/docs/progression.md +228 -0
- package/docs/react-hooks.md +686 -0
- package/docs/request-context.md +507 -0
- package/docs/service.md +590 -0
- package/docs/svelte-reactivite.md +293 -0
- package/docs/syslog.md +848 -0
- package/docs/testing.md +203 -0
- package/docs/vue-composables.md +255 -0
- package/man/nodefony.1 +152 -0
- package/package.json +163 -83
- package/templates/app/agents/AGENTS.md.tpl +967 -0
- package/templates/app/agents/POINTEUR.md.tpl +12 -0
- package/templates/app/base/Dockerfile.tpl +104 -0
- package/templates/app/base/README.md.tpl +314 -0
- package/templates/app/base/dockerignore.tpl +28 -0
- package/templates/app/base/env.ts.tpl +130 -0
- package/templates/app/base/gitattributes.tpl +28 -0
- package/templates/app/base/github/workflows/ci.yml.tpl +91 -0
- package/templates/app/base/gitignore.tpl +46 -0
- package/templates/app/base/gitlab-ci.yml.tpl +42 -0
- package/templates/app/base/index.ts.tpl +69 -0
- package/templates/app/base/nodefony.config.ts.tpl +342 -0
- package/templates/app/base/oxlintrc.json.tpl +127 -0
- package/templates/app/base/package.json.tpl +75 -0
- package/templates/app/base/prettierignore.tpl +24 -0
- package/templates/app/base/prettierrc.json.tpl +12 -0
- package/templates/app/base/rolldown.config.ts.tpl +8 -0
- package/templates/app/base/tests/config.test.ts.tpl +29 -0
- package/templates/app/base/tests/e2e.setup.ts.tpl +181 -0
- package/templates/app/base/tests/e2e.test.ts.tpl +105 -0
- package/templates/app/base/tests/migrations.e2e.test.ts.tpl +579 -0
- package/templates/app/base/tsconfig.json.tpl +47 -0
- package/templates/app/base/vitest.config.ts.tpl +88 -0
- package/templates/app/base/vitest.e2e.config.ts.tpl +39 -0
- package/templates/app/complete/compose.yaml.tpl +328 -0
- package/templates/app/complete/deploy/migrate-job.yaml.tpl +100 -0
- package/templates/app/complete/docker/db/init-nodefony-e2e.sql.tpl +30 -0
- package/templates/app/complete/docker/grafana/provisioning/datasources/loki.yaml.tpl +15 -0
- package/templates/app/complete/env.local.tpl +11 -0
- package/templates/app/complete/env.tpl +53 -0
- package/templates/app/complete/nodefony/entity/User.ts.tpl +69 -0
- package/templates/app/complete/nodefony/security/provisionUsers.ts.tpl +124 -0
- package/templates/app/complete/nodefony/service/AppBannerService.ts.tpl +98 -0
- package/templates/app/complete/nodefony/service/AppInfoService.ts.tpl +85 -0
- package/templates/app/frontend/angular/frontend/src/accent.css.tpl +34 -0
- package/templates/app/frontend/angular/frontend/src/app/app.component.ts.tpl +400 -0
- package/templates/app/frontend/react/frontend/src/App.tsx.tpl +421 -0
- package/templates/app/frontend/react/frontend/src/accent.css.tpl +30 -0
- package/templates/app/frontend/shared/frontend/src/brand.ts.tpl +3 -0
- package/templates/app/frontend/shared/frontend/src/showcase.css.tpl +224 -0
- package/templates/app/frontend/shared/nodefony/controllers/AppController.ts.tpl +45 -0
- package/templates/app/frontend/svelte/frontend/src/App.svelte.tpl +371 -0
- package/templates/app/frontend/svelte/frontend/src/accent.css.tpl +34 -0
- package/templates/app/frontend/vue/frontend/src/App.vue.tpl +367 -0
- package/templates/app/frontend/vue/frontend/src/accent.css.tpl +34 -0
- package/templates/app/home/nodefony/controllers/HomeController.ts.tpl +38 -0
- package/templates/command/nodefony/command/__NAME__.ts.tpl +132 -0
- package/templates/controller/duplex/nodefony/controllers/__NAME__.ts.tpl +188 -0
- package/templates/controller/example/nodefony/controllers/__NAME__.ts.tpl +348 -0
- package/templates/controller/hello/nodefony/controllers/__NAME__.ts.tpl +143 -0
- package/templates/controller/realtime/nodefony/controllers/__NAME__.ts.tpl +153 -0
- package/templates/controller/realtime/tests/__KEBAB__-realtime.test.ts.tpl +79 -0
- package/templates/controller/rest/nodefony/controllers/__NAME__.ts.tpl +159 -0
- package/templates/entity/base/nodefony/entity/__PASCAL__.schema.ts.tpl +31 -0
- package/templates/entity/base/nodefony/entity/__PASCAL__.ts.tpl +68 -0
- package/templates/entity/controller/nodefony/controllers/__PASCAL__Controller.ts.tpl +335 -0
- package/templates/entity/service/nodefony/service/__PASCAL__Service.ts.tpl +126 -0
- package/templates/entity/tests/tests/__KEBAB__.e2e.test.ts.tpl +358 -0
- package/templates/entity/tests/tests/__KEBAB__.test.ts.tpl +87 -0
- package/templates/front/angular/frontend/src/app/app.component.ts.tpl +30 -0
- package/templates/front/base/nodefony/controllers/__NAME__.ts.tpl +60 -0
- package/templates/front/react/frontend/src/App.tsx.tpl +26 -0
- package/templates/front/svelte/frontend/src/App.svelte.tpl +19 -0
- package/templates/front/vue/frontend/src/App.vue.tpl +23 -0
- package/templates/module/ai/AGENTS.md.tpl +71 -0
- package/templates/module/base/README.md.tpl +62 -0
- package/templates/module/base/docs/index.md.tpl +55 -0
- package/templates/module/base/index.ts.tpl +50 -0
- package/templates/module/base/nodefony/config/config.ts.tpl +60 -0
- package/templates/module/base/nodefony/config/defineModuleConfig.ts.tpl +55 -0
- package/templates/module/base/nodefony/src/errors/__PASCAL__Error.ts.tpl +20 -0
- package/templates/module/base/package.json.tpl +53 -0
- package/templates/module/base/rolldown.config.ts.tpl +14 -0
- package/templates/module/base/tests/__KEBAB__.test.ts.tpl +39 -0
- package/templates/module/base/tsconfig.json.tpl +42 -0
- package/templates/module/base/vitest.config.ts.tpl +27 -0
- package/templates/module/packages/CLAUDE.md.tpl +51 -0
- package/templates/module/packages/MEMORY.md.tpl +39 -0
- package/templates/module/packages/tsconfig.declarations.json.tpl +19 -0
- package/templates/module/packages/tsconfig.tests.json.tpl +11 -0
- package/templates/module/service/nodefony/interfaces/I__PASCAL__Service.ts.tpl +14 -0
- package/templates/module/service/nodefony/interfaces/index.ts.tpl +1 -0
- package/templates/module/service/nodefony/service/__PASCAL__Service.ts.tpl +116 -0
- package/templates/service/nodefony/interfaces/I__PASCAL__Service.ts.tpl +19 -0
- package/templates/service/nodefony/service/__PASCAL__Service.ts.tpl +136 -0
- package/templates/service/tests/__PASCAL__Service.test.ts.tpl +53 -0
- package/templates/shared/front-entry/angular/frontend/src/main.ts.tpl +17 -0
- package/templates/shared/front-entry/react/frontend/src/main.tsx.tpl +11 -0
- package/templates/shared/front-entry/svelte/frontend/src/main.ts.tpl +13 -0
- package/templates/shared/front-entry/vue/frontend/src/main.ts.tpl +12 -0
- package/templates/shared/front-registrar/nodefony/frontend/register__PASCAL__Entry.ts.tpl +40 -0
- package/templates/shared/front-shell/frontend/index.html.tpl +39 -0
- package/templates/shared/ng-app-tsconfig/frontend/tsconfig.app.json.tpl +18 -0
- package/templates/shared/svelte-shim/frontend/src/env.d.ts.tpl +12 -0
- package/templates/shared/vue-shim/frontend/src/env.d.ts.tpl +15 -0
- package/.yarnclean +0 -45
- package/CHANGELOG.md +0 -406
- package/autoloader.es6 +0 -253
- package/builder.es6 +0 -366
- package/cli/builder/bundles/bundle.js +0 -328
- package/cli/builder/bundles/controller.js +0 -73
- package/cli/builder/bundles/users-bundle/.yarnclean +0 -45
- package/cli/builder/bundles/users-bundle/Command/fixtureTask.js +0 -47
- package/cli/builder/bundles/users-bundle/Command/usersCommand.js +0 -105
- package/cli/builder/bundles/users-bundle/Entity/mongoose/userEntity.js +0 -168
- package/cli/builder/bundles/users-bundle/Entity/sequelize/userEntity.js +0 -231
- package/cli/builder/bundles/users-bundle/Fixtures/users.js +0 -117
- package/cli/builder/bundles/users-bundle/Fixtures/usersFixtures.js +0 -114
- package/cli/builder/bundles/users-bundle/Resources/config/config.js +0 -90
- package/cli/builder/bundles/users-bundle/Resources/config/routing.js +0 -17
- package/cli/builder/bundles/users-bundle/Resources/config/security.js +0 -96
- package/cli/builder/bundles/users-bundle/Resources/config/services.js +0 -7
- package/cli/builder/bundles/users-bundle/Resources/config/webpack/webpack.dev.config.js +0 -13
- package/cli/builder/bundles/users-bundle/Resources/config/webpack/webpack.prod.config.js +0 -31
- package/cli/builder/bundles/users-bundle/Resources/config/webpack.config.js +0 -146
- package/cli/builder/bundles/users-bundle/Resources/js/users.js +0 -153
- package/cli/builder/bundles/users-bundle/Resources/public/favicon.ico +0 -0
- package/cli/builder/bundles/users-bundle/Resources/public/images/users-logo.png +0 -0
- package/cli/builder/bundles/users-bundle/Resources/scss/awesome/font-awesome.config.js +0 -11
- package/cli/builder/bundles/users-bundle/Resources/scss/custom.scss +0 -23
- package/cli/builder/bundles/users-bundle/Resources/scss/users.scss +0 -59
- package/cli/builder/bundles/users-bundle/Resources/swagger/openapi/login.js +0 -235
- package/cli/builder/bundles/users-bundle/Resources/swagger/openapi/users.js +0 -232
- package/cli/builder/bundles/users-bundle/Resources/translations/login.en_en.yml +0 -14
- package/cli/builder/bundles/users-bundle/Resources/translations/login.fr_fr.yml +0 -14
- package/cli/builder/bundles/users-bundle/Resources/translations/users.en_en.yml +0 -35
- package/cli/builder/bundles/users-bundle/Resources/translations/users.fr_fr.yml +0 -36
- package/cli/builder/bundles/users-bundle/Resources/views/base.html.twig +0 -32
- package/cli/builder/bundles/users-bundle/Resources/views/footer.html.twig +0 -7
- package/cli/builder/bundles/users-bundle/Resources/views/header.html.twig +0 -90
- package/cli/builder/bundles/users-bundle/Resources/views/login/login.html.twig +0 -43
- package/cli/builder/bundles/users-bundle/Resources/views/users/createUser.html.twig +0 -296
- package/cli/builder/bundles/users-bundle/Resources/views/users/readUsers.html.twig +0 -94
- package/cli/builder/bundles/users-bundle/controller/api/graphql/graphqlController.js +0 -56
- package/cli/builder/bundles/users-bundle/controller/api/graphql/userResolver.js +0 -121
- package/cli/builder/bundles/users-bundle/controller/api/graphql/usertype.js +0 -58
- package/cli/builder/bundles/users-bundle/controller/api/openapi/loginApiController.js +0 -210
- package/cli/builder/bundles/users-bundle/controller/api/openapi/restUserController.js +0 -244
- package/cli/builder/bundles/users-bundle/controller/loginController.js +0 -91
- package/cli/builder/bundles/users-bundle/controller/usersController.js +0 -332
- package/cli/builder/bundles/users-bundle/package.json +0 -58
- package/cli/builder/bundles/users-bundle/readme.md +0 -360
- package/cli/builder/bundles/users-bundle/services/usersService.js +0 -411
- package/cli/builder/bundles/users-bundle/src/providers/mongoose/userProvider.js +0 -47
- package/cli/builder/bundles/users-bundle/src/providers/sequelize/userProvider.js +0 -48
- package/cli/builder/bundles/users-bundle/tests/loginTest.js +0 -182
- package/cli/builder/bundles/users-bundle/usersBundle.js +0 -26
- package/cli/builder/microService/microService.js +0 -261
- package/cli/builder/microService/skeletons/.editorconfig +0 -18
- package/cli/builder/microService/skeletons/.env-cmdrc.js +0 -32
- package/cli/builder/microService/skeletons/.jshintrc +0 -37
- package/cli/builder/microService/skeletons/README.md +0 -117
- package/cli/builder/microService/skeletons/bin/bash/hello.sh +0 -5
- package/cli/builder/microService/skeletons/bin/cli +0 -13
- package/cli/builder/microService/skeletons/bin/python/hello.py +0 -20
- package/cli/builder/microService/skeletons/config/config.js +0 -29
- package/cli/builder/microService/skeletons/config/pm2.config.js +0 -72
- package/cli/builder/microService/skeletons/config/webpack/webpack.config.dev.js +0 -8
- package/cli/builder/microService/skeletons/config/webpack/webpack.config.prod.js +0 -25
- package/cli/builder/microService/skeletons/config/webpack.config.js +0 -114
- package/cli/builder/microService/skeletons/package.json +0 -76
- package/cli/builder/microService/skeletons/src/browser/index.css +0 -3
- package/cli/builder/microService/skeletons/src/browser/index.js +0 -16
- package/cli/builder/microService/skeletons/src/browser/socketio.js +0 -46
- package/cli/builder/microService/skeletons/src/cli/cli.js +0 -224
- package/cli/builder/microService/skeletons/src/cli/menu.js +0 -28
- package/cli/builder/microService/skeletons/src/n-api/README.md +0 -1
- package/cli/builder/microService/skeletons/src/n-api/binding.gyp +0 -14
- package/cli/builder/microService/skeletons/src/n-api/hello.cc +0 -14
- package/cli/builder/microService/skeletons/src/n-api/hello.js +0 -23
- package/cli/builder/microService/skeletons/src/n-api/package.json +0 -15
- package/cli/builder/microService/skeletons/src/node/examples/index.js +0 -120
- package/cli/builder/microService/skeletons/src/node/index.js +0 -102
- package/cli/builder/microService/skeletons/src/node/services/markdown/markdown.js +0 -27
- package/cli/builder/microService/skeletons/src/node/services/servers/http.js +0 -45
- package/cli/builder/microService/skeletons/src/node/services/servers/https.js +0 -44
- package/cli/builder/microService/skeletons/src/node/services/socketio/socketio.js +0 -46
- package/cli/builder/microService/skeletons/src/node/services/syscall/syscall.js +0 -111
- package/cli/builder/microService/skeletons/src/node/services/worker/thread.js +0 -59
- package/cli/builder/microService/skeletons/src/node/services/worker/worker.js +0 -60
- package/cli/builder/microService/skeletons/src/templates/base.html +0 -12
- package/cli/builder/microService/skeletons/src/templates/socket.html +0 -23
- package/cli/builder/microService/skeletons/tests/unit/serviceTest.js +0 -30
- package/cli/builder/project/project.js +0 -474
- package/cli/builder/project/skeletons/README.md +0 -778
- package/cli/builder/project/skeletons/bin/dev-deploy.sh +0 -5
- package/cli/builder/project/skeletons/bin/generateCertificates.sh.skeleton +0 -180
- package/cli/builder/project/skeletons/bin/prod-deploy.sh +0 -3
- package/cli/builder/project/skeletons/config/config.js.skeleton +0 -178
- package/cli/builder/project/skeletons/config/openssl/ca/openssl.cnf.skeleton +0 -150
- package/cli/builder/project/skeletons/config/openssl/ca_intermediate/openssl.cnf.skeleton +0 -152
- package/cli/builder/project/skeletons/config/pm2.config.js.skeleton +0 -62
- package/cli/builder/project/skeletons/documentation.html.twig +0 -24
- package/cli/builder/project/skeletons/editorconfig.skeleton +0 -18
- package/cli/builder/project/skeletons/eslintignore.skeleton +0 -15
- package/cli/builder/project/skeletons/eslintrc.js.skeleton +0 -97
- package/cli/builder/project/skeletons/gitignore.skeleton +0 -32
- package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.37.entity-user.js +0 -137
- package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.38.entity-session.js +0 -97
- package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.39.entity-requests.js +0 -115
- package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.40.entity-jwts.js +0 -97
- package/cli/builder/project/skeletons/migrations/migrations.skeleton.js +0 -101
- package/cli/builder/project/skeletons/package.json.twig +0 -71
- package/cli/builder/react/reactBuilder.js +0 -224
- package/cli/builder/react/skeletons/app/Resources/databases/nodefony.db +0 -0
- package/cli/builder/react/skeletons/app/Resources/translations/messages.en_en.yml +0 -5
- package/cli/builder/react/skeletons/app/Resources/translations/messages.fr_fr.yml +0 -5
- package/cli/builder/react/skeletons/app/Resources/views/base.html.twig +0 -33
- package/cli/builder/react/skeletons/app/config/config.js +0 -392
- package/cli/builder/react/skeletons/app/config/routing.js +0 -10
- package/cli/builder/react/skeletons/app/config/security.js +0 -74
- package/cli/builder/react/skeletons/app/controller/appController.js +0 -22
- package/cli/builder/sandbox/sandBoxBuilder.js +0 -610
- package/cli/builder/sandbox/skeletons/Resources/css/entry.css +0 -48
- package/cli/builder/sandbox/skeletons/Resources/js/entry.js +0 -60
- package/cli/builder/sandbox/skeletons/Resources/public/manifest.json +0 -32
- package/cli/builder/sandbox/skeletons/Resources/translations/messages.en_en.yml +0 -5
- package/cli/builder/sandbox/skeletons/Resources/translations/messages.fr_fr.yml +0 -5
- package/cli/builder/sandbox/skeletons/Resources/views/base.html.twig +0 -46
- package/cli/builder/sandbox/skeletons/Resources/views/index.html.twig +0 -34
- package/cli/builder/sandbox/skeletons/bootstrap/custom.scss +0 -27
- package/cli/builder/sandbox/skeletons/bootstrap/entry.scss +0 -60
- package/cli/builder/sandbox/skeletons/workbox/templates/index.html.twig +0 -32
- package/cli/builder/sandbox/skeletons/workbox/workers/service-worker.js +0 -196
- package/cli/builder/skeletons/Resources/public/favicon.ico +0 -0
- package/cli/builder/skeletons/Resources/public/images/app-logo.png +0 -0
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/401.html.twig +0 -1
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/401.json.twig +0 -24
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/403.html.twig +0 -1
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/403.json.twig +0 -20
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/404.html.twig +0 -1
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/404.json.twig +0 -20
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/500.html.twig +0 -1
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/base.html.twig +0 -30
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/exception.html.twig +0 -1
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/exception.json.twig +0 -24
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/footer.html.twig +0 -33
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/header.html.twig +0 -6
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/index.html.twig +0 -6
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/index.json.twig +0 -1
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/layout.html.twig +0 -125
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/layout.json.twig +0 -5
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/timeout.html.twig +0 -1
- package/cli/builder/skeletons/Resources/views/framework-bundle/views/timeout.json.twig +0 -24
- package/cli/builder/skeletons/app/appKernel.js +0 -133
- package/cli/builder/skeletons/binding/binding.cc +0 -26
- package/cli/builder/skeletons/binding/binding.skeleton +0 -8
- package/cli/builder/skeletons/bundle/bundleClass.js +0 -37
- package/cli/builder/skeletons/command/commandClass.js +0 -11
- package/cli/builder/skeletons/command/taskClass.js +0 -20
- package/cli/builder/skeletons/config/config.js +0 -138
- package/cli/builder/skeletons/config/nodefony/elastic-bundle.js +0 -37
- package/cli/builder/skeletons/config/nodefony/framework-bundle.js +0 -22
- package/cli/builder/skeletons/config/nodefony/http-bundle.js +0 -104
- package/cli/builder/skeletons/config/nodefony/mail-bundle.js +0 -44
- package/cli/builder/skeletons/config/nodefony/mongoose-bundle.js +0 -51
- package/cli/builder/skeletons/config/nodefony/monitoring-bundle.js +0 -34
- package/cli/builder/skeletons/config/nodefony/realtime-bundle.js +0 -15
- package/cli/builder/skeletons/config/nodefony/redis-bundle.js +0 -44
- package/cli/builder/skeletons/config/nodefony/security-bundle.js +0 -25
- package/cli/builder/skeletons/config/nodefony/sequelize-bundle.js +0 -156
- package/cli/builder/skeletons/config/routing.js +0 -55
- package/cli/builder/skeletons/config/security.js +0 -102
- package/cli/builder/skeletons/config/services.js +0 -1
- package/cli/builder/skeletons/config/webpack/webpack.dev.config.js +0 -13
- package/cli/builder/skeletons/config/webpack/webpack.prod.config.js +0 -20
- package/cli/builder/skeletons/config/webpack.config.js +0 -148
- package/cli/builder/skeletons/controller/controllerClass.js +0 -75
- package/cli/builder/skeletons/package.json.twig +0 -57
- package/cli/builder/skeletons/unittest/testFile.js +0 -46
- package/cli/builder/vue/skeletons/Resources/public/images/app-logo.png +0 -0
- package/cli/builder/vue/skeletons/Resources/translations/messages.en_en.yml +0 -5
- package/cli/builder/vue/skeletons/Resources/translations/messages.fr_fr.yml +0 -5
- package/cli/builder/vue/skeletons/vue.config.js +0 -129
- package/cli/builder/vue/vueBuilder.js +0 -410
- package/cli/generate/generate.es6 +0 -103
- package/cli/install/install.js +0 -190
- package/cli/sequelize/sequelize.js +0 -94
- package/cli/start.js +0 -702
- package/cli/tools/pm2.es6 +0 -112
- package/cli/tools/tools.es6 +0 -97
- package/cli.es6 +0 -925
- package/container.es6 +0 -272
- package/error.es6 +0 -293
- package/fileClass.es6 +0 -242
- package/finder/file.es6 +0 -33
- package/finder/fileResult.es6 +0 -138
- package/finder/finder2.es6 +0 -275
- package/finder.es6 +0 -427
- package/kernel/annotations/annotations.es6 +0 -286
- package/kernel/api/api.es6 +0 -61
- package/kernel/api/graphqlApi.es6 +0 -107
- package/kernel/api/jsonApi.es6 +0 -177
- package/kernel/api/openApi.es6 +0 -139
- package/kernel/api/schemas/openApiSchema.js +0 -394
- package/kernel/babylon.es6 +0 -162
- package/kernel/bundle.es6 +0 -1200
- package/kernel/cliKernel.es6 +0 -869
- package/kernel/command.es6 +0 -78
- package/kernel/commands/nodefonyCommand.es6 +0 -247
- package/kernel/commands/tasks/bundlesTask.es6 +0 -59
- package/kernel/controllers/controller.es6 +0 -791
- package/kernel/fixture.es6 +0 -19
- package/kernel/injections/injections.es6 +0 -424
- package/kernel/kernel.es6 +0 -1960
- package/kernel/kernelWatcher.es6 +0 -387
- package/kernel/orm/entity.es6 +0 -59
- package/kernel/orm/orm.es6 +0 -139
- package/kernel/reader.es6 +0 -290
- package/kernel/security/encoder.es6 +0 -17
- package/kernel/security/factories/factory.es6 +0 -111
- package/kernel/security/factories/passeportFactory.es6 +0 -61
- package/kernel/security/provider.es6 +0 -58
- package/kernel/security/providers/chainProvider.es6 +0 -99
- package/kernel/security/providers/memoryProvider.es6 +0 -55
- package/kernel/security/providers/providerManager.es6 +0 -67
- package/kernel/security/providers/userEntityProvider.es6 +0 -50
- package/kernel/security/role.es6 +0 -12
- package/kernel/security/secureArea.es6 +0 -431
- package/kernel/security/tokens/token.es6 +0 -171
- package/kernel/security/user.es6 +0 -106
- package/kernel/serviceRealTime.es6 +0 -21
- package/kernel/services/connectionsService.es6 +0 -93
- package/kernel/services/cron/cronService.es6 +0 -123
- package/kernel/task.es6 +0 -80
- package/kernel/templates.es6 +0 -22
- package/kernel/templating/twig.es6 +0 -218
- package/kernel/tests/cliTest.js +0 -59
- package/kernel/tests/containerTest.js +0 -232
- package/kernel/tests/kernelTest.js +0 -39
- package/nodefony.es6 +0 -1084
- package/notificationsCenter.es6 +0 -118
- package/protocol.es6 +0 -86
- package/protocols/bayeux.es6 +0 -174
- package/protocols/jsonRpc/jsonrpc.es6 +0 -56
- package/result.es6 +0 -99
- package/service.es6 +0 -288
- package/syslog/pdu.es6 +0 -141
- package/syslog/syslog.es6 +0 -754
- package/watcher.es6 +0 -113
package/README.md
CHANGED
|
@@ -1,778 +1,400 @@
|
|
|
1
|
-
<
|
|
2
|
-
<img src="https://github.com/nodefony/nodefony/raw/master/src/nodefony/bundles/framework-bundle/Resources/public/images/nodefony-logo.png"><br>
|
|
3
|
-
</p>
|
|
4
|
-
<h1 align="center">NODEFONY V7</h1>
|
|
1
|
+
<div align="center">
|
|
5
2
|
|
|
3
|
+
<img src="https://raw.githubusercontent.com/nodefony/nodefony-core/main/docs/assets/nodefony-logo.png" alt="Nodefony" height="96">
|
|
6
4
|
|
|
5
|
+
# Nodefony
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
**Le framework Node.js fullstack : temps réel natif, développement agentic-ready, sur un socle TypeScript isomorphe.**
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
_Une action de contrôleur. Deux transports. La même session, la même sécurité, le même code._
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
[](https://github.com/nodefony/nodefony-core/blob/main/LICENSE.txt)
|
|
12
|
+
[](https://nodejs.org/)
|
|
13
|
+
[](https://www.typescriptlang.org/)
|
|
14
|
+
[](https://nodejs.org/api/esm.html)
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
</div>
|
|
15
17
|
|
|
18
|
+
---
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## Table of content
|
|
23
|
-
|
|
24
|
-
- [Features](#features)
|
|
25
|
-
- [Requirements](#requirements)
|
|
26
|
-
- [Linux OSX Installation](#install)
|
|
27
|
-
- [Windows Installation ](#installwin32)
|
|
28
|
-
- [Build Nodefony Project with CLI (Command Line Interface)](#buildcli)
|
|
29
|
-
- [Build Nodefony Project with STARTER](#buildstarter)
|
|
30
|
-
- [Start Development Mode](#start)
|
|
31
|
-
- [Start Production Mode](#start_prod)
|
|
32
|
-
- [Configurations](#configurations)
|
|
33
|
-
- [Quick Start](#bundles)
|
|
34
|
-
- [HTTPS Access](#https)
|
|
35
|
-
- [References / Thanks](#references--thanks)
|
|
36
|
-
- [Authors](#authors)
|
|
37
|
-
- [License](#license)
|
|
38
|
-
- [Demo](#demo)
|
|
39
|
-
|
|
40
|
-
## <a name="features"></a>Nodefony features :
|
|
41
|
-
|
|
42
|
-
- Servers ([http(s)](https://nodejs.org/dist/latest-v8.x/docs/api/https.html), [websocket(s)](https://github.com/theturtle32/WebSocket-Node), statics, sockjs)
|
|
43
|
-
- [HTTP2](https://nodejs.org/api/http2.html) ready node module provides an implementation of the HTTP/2 (push server ready).
|
|
44
|
-
- Dynamics routing
|
|
45
|
-
- ORM [Sequelize](http://docs.sequelizejs.com)
|
|
46
|
-
- ORM [mongoose](http://mongoosejs.com/index.html)
|
|
47
|
-
- Simple Databases Services connections (Redis, Mongo, Elasticsearch, mysql, sqlite ...).
|
|
48
|
-
- MVC Templating Server Side ([Twig](https://github.com/twigjs/twig.js))
|
|
49
|
-
- Notion of real-time context in Action Controller (websocket).
|
|
50
|
-
- Notion of synchronous or asynchronous execution in Action Controller (Promise, Async, Await).
|
|
51
|
-
- Services Containers, Dependency Injection (Design Patterns)
|
|
52
|
-
- Sessions Manager (ORM, Memcached)
|
|
53
|
-
- Authentication Manager (Digest, Basic, oAuth, Local, ldap, jwt, openid, passportjs)
|
|
54
|
-
- WAF ( Web application firewall )
|
|
55
|
-
- Cross-Origin Resource Sharing ([CORS](https://www.w3.org/TR/cors/))
|
|
56
|
-
- Production Management ([PM2](https://github.com/Unitech/pm2/))
|
|
57
|
-
- RealTime API ([Bayeux Protocol](http://autogrowsystems.github.io/faye-go/))
|
|
58
|
-
- Webpack Assets management (Like WDS with HMR hot module Replacement)
|
|
59
|
-
- C++ Addons (Binding in Bundle)
|
|
60
|
-
- Translations
|
|
61
|
-
- CLI (Command Line Interface)
|
|
62
|
-
- Monitororing , Debug Bar
|
|
63
|
-
- Unit Test Api in framework context ([MOCHA](https://mochajs.org/))
|
|
64
|
-
|
|
65
|
-
**Nodefony assimilates into the ecosystem of node.js with services like** :
|
|
66
|
-
|
|
67
|
-
- [WEBPACK](https://webpack.js.org/) Module bundler for assets management of application .
|
|
68
|
-
- [SockJS](https://github.com/sockjs) Server ( Like WDS 'Webpack Dev Server' and HMR management )
|
|
69
|
-
- [WATCHER](https://nodejs.org/docs/latest/api/fs.html#fs_fs_watch_filename_options_listener) node.js for auto reload-files in developement mode .
|
|
70
|
-
- [PM2](http://pm2.keymetrics.io/) Production Process Manager for Node.js .
|
|
71
|
-
- [Passport](http://passportjs.org/) Simple, unobtrusive authentication for Node.js .
|
|
72
|
-
- ~~[Angular](https://github.com/angular/angular-cli) Experimental Bundle Generator ( Angular cli no longer allows the ejection of a webpack config)~~
|
|
73
|
-
|
|
74
|
-
**Nodefony 7 adds the following features** :
|
|
75
|
-
|
|
76
|
-
- [React](https://github.com/facebookincubator/create-react-app) Experimental Bundle Generator ( Now an React Project can be merge into a Nodefony Bundle )
|
|
77
|
-
- [Vue.js](https://vuejs.org) Experimental Bundle Generator ( Now an Vue.js Project can be merge into a Nodefony Bundle )
|
|
78
|
-
- [Api swagger-ui](https://swagger.io/) ( Documentation Api with swagger and openapi AOS3)
|
|
79
|
-
- [Api graphql](https://graphql.org/) ( Documentation Api with graphiql)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
Evolution priorities for the next version will focus on robustness, unit testing, documentation and security.
|
|
83
|
-
|
|
84
|
-
You can follow Nodefony build with github actions at **<https://github.com/nodefony/nodefony/actions>**
|
|
85
|
-
|
|
86
|
-
## Nodefony Module Implementation
|
|
87
|
-
|
|
88
|
-
Nodefony implements modules with CommonJS and ECMAScript 6 (Class, Inheritance). The development framework has now decided to migrate to TypeScript to leverage its type-checking capabilities and improve code quality and maintainability. [nodefony-core](https://github.com/nodefony/nodefony-core).
|
|
89
|
-
|
|
90
|
-
For more information on TypeScript, see the [TypeScript documentation](https://www.typescriptlang.org/).
|
|
91
|
-
|
|
92
|
-
The proposal for type annotations in ECMAScript is still relevant and can be followed here: [proposal-type-annotations](https://github.com/tc39/proposal-type-annotations).
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## **Resources for Newcomers**
|
|
96
|
-
|
|
97
|
-
#### - **[Nodefony Starter Demo](https://nodefony.net)**
|
|
98
|
-
|
|
99
|
-
#### - **[Nodefony Github](https://github.com/nodefony/nodefony)**
|
|
100
|
-
|
|
101
|
-
#### - **[Nodefony Documentation](https://nodefony.net/documentation/nodefony)**
|
|
102
|
-
|
|
103
|
-
#### Documentation in progress !!
|
|
104
|
-
|
|
105
|
-
## <a name="requirements"></a>Requirements
|
|
106
|
-
|
|
107
|
-
#### On your system _you must have Installed_ :
|
|
108
|
-
|
|
109
|
-
- **[GIT](http://git-scm.com/)** is Distributed version control system
|
|
110
|
-
|
|
111
|
-
- **[Node.js](https://nodejs.org/)** ® is a Platform built on Chrome's JavaScript runtime ( >= 8 )
|
|
112
|
-
|
|
113
|
-
- **[npm](https://www.npmjs.com/)** or **[yarn](https://yarnpkg.com/lang/en/)** or **[pnpm](https://pnpm.io/cli/install)** Packages Manager for javascript application
|
|
114
|
-
|
|
115
|
-
- **[nvm](https://github.com/nvm-sh/nvm/)** Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
|
|
116
|
-
|
|
117
|
-
- **[OpenSSL](https://www.openssl.org/)** Toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols
|
|
118
|
-
|
|
119
|
-
- **[GNU Bash](https://www.gnu.org/software/bash/)** Bash is the GNU Project's shell
|
|
120
|
-
|
|
121
|
-
#### Operating Systems :
|
|
122
|
-
|
|
123
|
-
- LINUX
|
|
124
|
-
- Debian, Ubuntu (Checked, Tested)
|
|
125
|
-
- RASPBIAN Raspberry Pi (Checked)
|
|
126
|
-
|
|
127
|
-
- MACOS (Checked, Tested)
|
|
128
|
-
|
|
129
|
-
- WINDOWS (Checked)
|
|
130
|
-
|
|
131
|
-
- FreeBSD (Checked)
|
|
132
|
-
- pkg install bash gmake gcc6
|
|
133
|
-
- setenv CC "/usr/local/bin/gcc"
|
|
134
|
-
- setenv CXX "/usr/local/bin/g++"
|
|
135
|
-
- cd /usr/local/bin/ ;ln -s pythonx.x python
|
|
136
|
-
|
|
137
|
-
- ~~OpenBSD (Not Checked yet )~~
|
|
138
|
-
|
|
139
|
-
- ~~[ELECTRON](https://github.com/nodefony/nodefony-electron) Experimental Nodefony Electron ( Now an Electron Context can be use in Nodefony Project )~~
|
|
140
|
-
|
|
141
|
-
- EMBEDDED SYSTEM ( Very difficult : large memory footprint )
|
|
142
|
-
|
|
143
|
-
## <a name="install"></a> Linux or OSX Installation
|
|
144
|
-
|
|
145
|
-
**[NVM](https://github.com/nvm-sh/nvm#installation-and-update) Installation (Node Version Manager )** :
|
|
146
|
-
- [NVM](https://github.com/creationix/nvm) Node Version Manager - Simple bash script to manage multiple active node.js versions
|
|
147
|
-
|
|
148
|
-
To install or update nvm, you can use the install script:
|
|
149
|
-
```sh
|
|
150
|
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
|
151
|
-
# or
|
|
152
|
-
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
|
153
|
-
|
|
154
|
-
$ source ~/.bashrc # or source ~/.bash_profile
|
|
155
|
-
$ nvm ls-remote # show all remote versions
|
|
156
|
-
$ nvm ls # show local versions
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**[Node.js](https://nodejs.org/) Installation with [NVM](https://github.com/creationix/nvm)** :
|
|
160
|
-
```sh
|
|
161
|
-
nvm install node # "node" is an alias for the latest version
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
**[Nodefony](https://nodefony.net) Excutable Installation (Globally)** :
|
|
20
|
+
> **Ce paquet est le CŒUR du framework** — noyau, injection de dépendances, modules, journalisation,
|
|
21
|
+
> interface en ligne de commande. Il s'installe rarement seul : une application le reçoit par
|
|
22
|
+
> `npm create nodefony@alpha`, et les autres paquets (`@nodefony/http`, `@nodefony/framework`,
|
|
23
|
+
> `@nodefony/security`…) le déclarent en dépendance de pair.
|
|
165
24
|
|
|
166
25
|
```bash
|
|
167
|
-
npm
|
|
168
|
-
|
|
169
|
-
# or with yarn
|
|
170
|
-
|
|
171
|
-
yarn global add nodefony
|
|
26
|
+
npm install nodefony@alpha
|
|
172
27
|
```
|
|
173
28
|
|
|
174
|
-
|
|
29
|
+
> Le dist-tag est OBLIGATOIRE tant que la série 10 est en préversion : `latest` sert encore la
|
|
30
|
+
> `7.0.2`, écrite en JavaScript, dont l'API n'a aucun rapport avec ce qui suit.
|
|
175
31
|
|
|
176
|
-
|
|
177
|
-
- Different Node.js version (NODE_MODULE_VERSION XX) use 'nodefony rebuild'
|
|
32
|
+
## Ce que c'est
|
|
178
33
|
|
|
179
|
-
|
|
34
|
+
Nodefony est un framework serveur fullstack pour Node.js, écrit en TypeScript strict et bâti
|
|
35
|
+
directement sur les modules natifs de la plateforme — `node:http`, `node:http2`, WebSocket. Il
|
|
36
|
+
apporte un noyau à injection de dépendances, un système de modules, un pare-feu applicatif, une
|
|
37
|
+
persistance portable, une console d'administration et la construction des frontends.
|
|
180
38
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
or To install or update Node.js, you can download installer here [Node.js](https://nodejs.org/en/)
|
|
39
|
+
Sa particularité tient en une propriété : **le WebSocket n'y est pas un ajout.** C'est un transport
|
|
40
|
+
de première classe, servi par le même pipeline, la même table de routes et la même sécurité que le
|
|
41
|
+
HTTP. Une application temps réel s'y écrit comme une application web ordinaire.
|
|
185
42
|
|
|
186
|
-
**
|
|
43
|
+
Le socle est **isomorphe** : le même paquet s'importe côté serveur et côté navigateur. Le client
|
|
44
|
+
temps réel, les règles d'autorisation et les types d'une ressource sont écrits une fois et
|
|
45
|
+
s'exécutent là où ils servent — une règle corrigée l'est des deux côtés.
|
|
187
46
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
47
|
+
Nodefony est publié depuis **2017** en JavaScript et a mûri jusqu'à sa version 7. La série 10 est
|
|
48
|
+
une **réécriture complète en TypeScript** : même projet, mêmes concepts, repensés pour ce que
|
|
49
|
+
Node.js et TypeScript sont devenus.
|
|
191
50
|
|
|
192
|
-
|
|
51
|
+
## Une action, deux transports
|
|
193
52
|
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
**Add NPM global bin in $Path windows** :
|
|
53
|
+
Même classe, même session, mêmes règles d'accès — seul le transport déclaré change :
|
|
197
54
|
|
|
198
|
-
|
|
55
|
+
```typescript
|
|
56
|
+
import {
|
|
57
|
+
route,
|
|
58
|
+
controller,
|
|
59
|
+
Controller,
|
|
60
|
+
CurrentUser,
|
|
61
|
+
} from "@nodefony/framework";
|
|
62
|
+
import type { ContextType } from "@nodefony/http";
|
|
199
63
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
64
|
+
@controller("/api/blog")
|
|
65
|
+
class BlogController extends Controller {
|
|
66
|
+
constructor(context: ContextType) {
|
|
67
|
+
super("blog", context);
|
|
68
|
+
}
|
|
205
69
|
|
|
206
|
-
|
|
70
|
+
@route("blog-index", { path: "", method: "GET" })
|
|
71
|
+
async index(@CurrentUser() user?: { identifier?: string }) {
|
|
72
|
+
return this.renderJson({
|
|
73
|
+
hello: "blog",
|
|
74
|
+
who: user?.identifier ?? "anonyme",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
207
77
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
78
|
+
@route("blog-echo", {
|
|
79
|
+
path: "/echo",
|
|
80
|
+
requirements: { methods: ["WEBSOCKET"] },
|
|
81
|
+
})
|
|
82
|
+
async echo(message: string | Buffer | null) {
|
|
83
|
+
if (!message) return this.renderJson({ handshake: true });
|
|
84
|
+
return this.renderJson({ echo: message.toString() });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
212
87
|
```
|
|
213
88
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
89
|
+
La pseudo-méthode `WEBSOCKET` est traitée comme un verbe HTTP ordinaire : **une seule table de
|
|
90
|
+
routes** pour les deux transports, et la même bulle `AsyncLocalStorage` du handshake à la fermeture.
|
|
91
|
+
Une règle d'autorisation protège donc l'action quel que soit le transport, et la session ouverte en
|
|
92
|
+
HTTP est celle que voit la socket.
|
|
218
93
|
|
|
219
|
-
|
|
220
|
-
npm run nodefony
|
|
221
|
-
```
|
|
222
|
-
**By using npx**
|
|
223
|
-
***note: npx is included with npm > v5.2 or can be installed separately.***
|
|
224
|
-
```bash
|
|
225
|
-
npx nodefony -v
|
|
226
|
-
7.0.0-beta.10
|
|
227
|
-
```
|
|
94
|
+
## Démarrer
|
|
228
95
|
|
|
229
|
-
**The long way with the full path**
|
|
230
96
|
```bash
|
|
231
|
-
|
|
232
|
-
#Or with the shortcut using npm bin
|
|
233
|
-
$(npm bin)/nodefony
|
|
97
|
+
npm create nodefony@alpha mon-app
|
|
234
98
|
```
|
|
235
99
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
100
|
+
Puis, dans le dossier créé : `npm run dev`.
|
|
101
|
+
|
|
102
|
+
Le générateur produit une application complète — configuration validée, base de données au choix,
|
|
103
|
+
frontend optionnel (React, Vue, Angular, Svelte), `Dockerfile`, et un `AGENTS.md` dérivé du projet.
|
|
104
|
+
|
|
105
|
+
## Les paquets de la série 10
|
|
106
|
+
|
|
107
|
+
| Paquet | Rôle |
|
|
108
|
+
| ------------------------------------------------------------------ | ----------------------------------------------------------- |
|
|
109
|
+
| **`nodefony`** | ce paquet — noyau, DI, modules, journalisation, CLI |
|
|
110
|
+
| `@nodefony/http` | serveurs HTTP/1.1, HTTP/2 et WebSocket, contextes, sessions |
|
|
111
|
+
| `@nodefony/framework` | routeur, contrôleurs, décorateurs de route |
|
|
112
|
+
| `@nodefony/security` | pare-feu applicatif, authentification, autorisation |
|
|
113
|
+
| `@nodefony/orm-core` · `@nodefony/drizzle` · `@nodefony/mongoose` | persistance portable |
|
|
114
|
+
| `@nodefony/user` | entité et service utilisateur |
|
|
115
|
+
| `@nodefony/realtime` | canaux temps réel, diffusion multi-instances |
|
|
116
|
+
| `@nodefony/frontend` | pilotage de Vite, rechargement à chaud, construction |
|
|
117
|
+
| `@nodefony/studio` | console d'administration |
|
|
118
|
+
| `@nodefony/documentation` · `@nodefony/devkit` · `@nodefony/redis` | documentation, outillage agent, cache et bus |
|
|
119
|
+
|
|
120
|
+
## Aller plus loin
|
|
121
|
+
|
|
122
|
+
- **Documentation** — <https://nodefony.github.io/nodefony-core/>
|
|
123
|
+
- **Dépôt et suivi** — <https://github.com/nodefony/nodefony-core>
|
|
124
|
+
- **Journal des versions** — <https://github.com/nodefony/nodefony-core/blob/main/CHANGELOG.md>
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
# API du cœur
|
|
129
|
+
|
|
130
|
+
Ce qui suit documente le paquet `nodefony` lui-même. Pour écrire une application — contrôleurs,
|
|
131
|
+
routes, sécurité —, se reporter à la documentation ci-dessus.
|
|
132
|
+
|
|
133
|
+
## Exports ESM
|
|
134
|
+
|
|
135
|
+
Le package `nodefony` est **ESM-only** — zéro `require()`, zéro default export.
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
// Imports nommés uniquement
|
|
139
|
+
import {
|
|
140
|
+
Nodefony,
|
|
141
|
+
Kernel,
|
|
142
|
+
Module,
|
|
143
|
+
Service,
|
|
144
|
+
Container,
|
|
145
|
+
Event,
|
|
146
|
+
Syslog,
|
|
147
|
+
Pdu,
|
|
148
|
+
nodefonyError,
|
|
149
|
+
inject,
|
|
150
|
+
injectable,
|
|
151
|
+
services,
|
|
152
|
+
entities,
|
|
153
|
+
extend,
|
|
154
|
+
typeOf,
|
|
155
|
+
isArray,
|
|
156
|
+
} from "nodefony";
|
|
157
|
+
|
|
158
|
+
// Types (tree-shaken à la compilation)
|
|
159
|
+
import type {
|
|
160
|
+
IKernel,
|
|
161
|
+
IService,
|
|
162
|
+
IContainer,
|
|
163
|
+
IScope,
|
|
164
|
+
DynamicParam,
|
|
165
|
+
} from "nodefony";
|
|
251
166
|
```
|
|
252
|
-
**Cli Usage NO INTERRATIVE** :
|
|
253
167
|
|
|
254
|
-
|
|
168
|
+
> `Error` n'est plus exporté — utiliser `nodefonyError`.
|
|
255
169
|
|
|
256
|
-
|
|
257
|
-
# CLI generate project name : myproject
|
|
170
|
+
---
|
|
258
171
|
|
|
259
|
-
|
|
260
|
-
$ cd myproject
|
|
261
|
-
```
|
|
172
|
+
## Nodefony — Classe statique
|
|
262
173
|
|
|
263
|
-
|
|
174
|
+
Point d'accès au kernel depuis n'importe où dans l'application.
|
|
264
175
|
|
|
265
|
-
```
|
|
266
|
-
|
|
176
|
+
```typescript
|
|
177
|
+
import { Nodefony } from "nodefony";
|
|
267
178
|
|
|
268
|
-
|
|
269
|
-
|
|
179
|
+
Nodefony.version; // "10.0.0"
|
|
180
|
+
Nodefony.getKernel(); // Kernel | null (null avant boot)
|
|
181
|
+
Nodefony.generateId(); // UUID v4
|
|
182
|
+
Nodefony.generateV5Id(name); // UUID v5
|
|
270
183
|
```
|
|
271
184
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
**CLI** :
|
|
275
|
-
|
|
276
|
-
Clone nodefony starter
|
|
277
|
-
```bash
|
|
278
|
-
$ git clone https://github.com/nodefony/nodefony-starter.git
|
|
279
|
-
$ cd nodefony
|
|
280
|
-
$ npx nodefony build
|
|
281
|
-
...
|
|
282
|
-
...
|
|
283
|
-
$ npm start
|
|
284
|
-
```
|
|
285
|
-
**CLI INTERATIVE** :
|
|
286
|
-
|
|
287
|
-
YOU CAN USE CLI INTERACTIVE MODE TO BUILD PROJECT (nodefony without args)
|
|
288
|
-
```bash
|
|
289
|
-
$ git clone https://github.com/nodefony/nodefony-starter.git
|
|
290
|
-
$ cd nodefony
|
|
291
|
-
$ ls -l
|
|
292
|
-
-rw-r--r-- 1 cci staff 21306 27 mar 19:22 README.md
|
|
293
|
-
drwxr-xr-x 12 cci staff 384 27 mar 19:25 app
|
|
294
|
-
drwxr-xr-x 3 cci staff 96 27 mar 19:22 bin
|
|
295
|
-
drwxr-xr-x 7 cci staff 224 27 mar 19:26 config
|
|
296
|
-
drwxr-xr-x 3 cci staff 96 27 mar 19:22 doc
|
|
297
|
-
drwxr-xr-x 1342 cci staff 42944 27 mar 19:24 node_modules
|
|
298
|
-
-rw-r--r-- 1 cci staff 997 27 mar 19:22 package.json
|
|
299
|
-
drwxr-xr-x 3 cci staff 96 27 mar 19:22 src
|
|
300
|
-
drwxr-xr-x 4 cci staff 128 29 mar 11:13 tmp
|
|
301
|
-
drwxr-xr-x 12 cci staff 384 29 mar 11:01 web
|
|
302
|
-
-rw-r--r-- 1 cci staff 542660 27 mar 19:24 yarn.lock
|
|
303
|
-
|
|
304
|
-
$ npx nodefony
|
|
305
|
-
|
|
306
|
-
? Nodefony CLI : (Use arrow keys)
|
|
307
|
-
❯ Build Project
|
|
308
|
-
Generater
|
|
309
|
-
Tools
|
|
310
|
-
PM2 Tools
|
|
311
|
-
--------
|
|
312
|
-
Help
|
|
313
|
-
Quit
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
## <a name="start"></a>Serving a Nodefony project via an development server
|
|
317
|
-
|
|
318
|
-
**Starting Development Servers** :
|
|
319
|
-
|
|
320
|
-
```bash
|
|
321
|
-
$ npx nodefony dev
|
|
322
|
-
|
|
323
|
-
# TO STOP
|
|
324
|
-
$ <ctrl-c>
|
|
325
|
-
```
|
|
326
|
-
**Starting Development Servers in Debug Mode (-d)** :
|
|
185
|
+
---
|
|
327
186
|
|
|
328
|
-
|
|
329
|
-
$ npx nodefony -d dev
|
|
187
|
+
## Service — Classe de base du framework
|
|
330
188
|
|
|
331
|
-
|
|
332
|
-
$ <ctrl-c>
|
|
333
|
-
```
|
|
189
|
+
`Service` est la brique fondamentale de Nodefony. Toutes les classes du framework (Kernel, Module, Controller, adapters ORM, services applicatifs) en héritent.
|
|
334
190
|
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
_ _ ___ ____ _____ _____ ___ _ _ __ __
|
|
338
|
-
| \ | | / _ \ | _ \ | ____| | ___| / _ \ | \ | | \ \ / /
|
|
339
|
-
| \| | | | | | | | | | | _| | |_ | | | | | \| | \ V /
|
|
340
|
-
| |\ | | |_| | | |_| | | |___ | _| | |_| | | |\ | | |
|
|
341
|
-
|_| \_| \___/ |____/ |_____| |_| \___/ |_| \_| |_|
|
|
342
|
-
|
|
343
|
-
Version : 4.0.0 Platform : linux Process : nodefony PID : 31635
|
|
344
|
-
|
|
345
|
-
Fri Jul 27 2018 17:01:11 INFO nodefony : WELCOME PROJECT : myproject 1.0.0
|
|
346
|
-
|
|
347
|
-
? Nodefony CLI :
|
|
348
|
-
❯ Start Servers Development
|
|
349
|
-
Start Servers Pre-Production
|
|
350
|
-
Start Servers Production
|
|
351
|
-
Install Project
|
|
352
|
-
Rebuild Project
|
|
353
|
-
Generater
|
|
354
|
-
Tools
|
|
355
|
-
PM2 Tools
|
|
356
|
-
Run Test
|
|
357
|
-
--------
|
|
358
|
-
Help
|
|
359
|
-
Quit
|
|
360
|
-
```
|
|
191
|
+
Elle intègre trois responsabilités dans une seule classe de base :
|
|
361
192
|
|
|
362
|
-
**
|
|
193
|
+
- **DI Container** — accès et injection de dépendances
|
|
194
|
+
- **EventEmitter** — système de notifications (délégation vers un `Event` interne)
|
|
195
|
+
- **Logging structuré** — via `Syslog` / `Pdu`
|
|
363
196
|
|
|
364
|
-
|
|
365
|
-
```bash
|
|
366
|
-
$ npm -g install npx
|
|
197
|
+
### Usage minimal
|
|
367
198
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
$ npx --node-options=--inspect nodefony dev
|
|
199
|
+
```typescript
|
|
200
|
+
import { Service } from "nodefony";
|
|
371
201
|
|
|
372
|
-
|
|
202
|
+
const svc = new Service("myService");
|
|
203
|
+
svc.log("Hello Nodefony", "INFO");
|
|
204
|
+
svc.on("ready", () => console.log("ready!"));
|
|
205
|
+
svc.emit("ready");
|
|
373
206
|
```
|
|
374
207
|
|
|
375
|
-
|
|
208
|
+
### Constructeur
|
|
376
209
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
210
|
+
```typescript
|
|
211
|
+
new Service(
|
|
212
|
+
name: string,
|
|
213
|
+
container?: Container,
|
|
214
|
+
notificationsCenter?: Event | false | null,
|
|
215
|
+
options?: DefaultOptionsService
|
|
216
|
+
)
|
|
382
217
|
```
|
|
383
|
-
Tools PM2 You can see PM2 config : config/pm2.config.js
|
|
384
|
-
```bash
|
|
385
|
-
# To See log
|
|
386
|
-
$ npx nodefony logs
|
|
387
218
|
|
|
388
|
-
|
|
389
|
-
|
|
219
|
+
| Paramètre | Défaut | Effet |
|
|
220
|
+
| ---------------------------- | ---------------------- | ---------------------------------------------- |
|
|
221
|
+
| `container` | `new Container()` | Container DI partagé ou auto-créé |
|
|
222
|
+
| `notificationsCenter` | `new Event()` | `false` = pas d'events ; `Event` = partagé |
|
|
223
|
+
| `options.events.nbListeners` | 10 | Nb max de listeners (propagé si Event partagé) |
|
|
224
|
+
| `options.syslog` | `{ moduleName: name }` | Config du Syslog interne |
|
|
390
225
|
|
|
391
|
-
|
|
392
|
-
$ npx nodefony kill
|
|
226
|
+
### Extension (pattern typique)
|
|
393
227
|
|
|
394
|
-
|
|
395
|
-
|
|
228
|
+
```typescript
|
|
229
|
+
import { Service, Container } from "nodefony";
|
|
396
230
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
or
|
|
402
|
-
$ npm run pm2 logs --lines 200
|
|
403
|
-
```
|
|
231
|
+
class MyService extends Service {
|
|
232
|
+
constructor(container: Container) {
|
|
233
|
+
super("MyService", container);
|
|
234
|
+
}
|
|
404
235
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
236
|
+
async doWork(): Promise<void> {
|
|
237
|
+
this.log("Starting work", "INFO");
|
|
238
|
+
this.fire("onWork", { ts: Date.now() });
|
|
239
|
+
}
|
|
240
|
+
}
|
|
408
241
|
```
|
|
409
242
|
|
|
410
|
-
|
|
243
|
+
### Container DI
|
|
411
244
|
|
|
412
|
-
|
|
245
|
+
```typescript
|
|
246
|
+
// Stocker / récupérer des services
|
|
247
|
+
svc.set("db", dbInstance);
|
|
248
|
+
const db = svc.get<Database>("db");
|
|
249
|
+
svc.has("db"); // true
|
|
413
250
|
|
|
414
|
-
|
|
251
|
+
// Paramètres (dot notation)
|
|
252
|
+
svc.setParameters("app.name", "myApp");
|
|
253
|
+
svc.getParameters("app.name"); // "myApp"
|
|
254
|
+
svc.setParameters("app.config.debug", true);
|
|
255
|
+
svc.getParameters("app.config.debug"); // true
|
|
415
256
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
ls -l config/openssl
|
|
419
|
-
|
|
420
|
-
├── ca
|
|
421
|
-
│ └── openssl.cnf
|
|
422
|
-
└── ca_intermediate
|
|
423
|
-
└── openssl.cnf
|
|
257
|
+
// Supprimer (appelle clean() si Service)
|
|
258
|
+
svc.remove("db"); // retourne toujours false (comportement actuel)
|
|
424
259
|
```
|
|
425
|
-
You must Add a Trusted CA in your Browser : projectName-root-ca.crt.pem
|
|
426
|
-
You can find certificate authority (ca) here:
|
|
427
|
-
|
|
428
|
-
config/certificates/ca/projectName-root-ca.crt.pem
|
|
429
|
-
|
|
430
|
-
#### Access to Secure App with URL : <https://localhost:5152>
|
|
431
|
-
#### Access to App with URL : <http://localhost:5151>
|
|
432
|
-
|
|
433
|
-
[](https://nodefony.net)
|
|
434
|
-
|
|
435
|
-
## <a name="configurations"></a>Framework Configurations
|
|
436
|
-
|
|
437
|
-
Open **[config/config.js](https://github.com/nodefony/nodefony/blob/master/config/config.js)** if you want change httpPort, domain ,servers, add bundle, locale ...
|
|
438
|
-
|
|
439
|
-
```js
|
|
440
|
-
/**
|
|
441
|
-
* NODEFONY FRAMEWORK
|
|
442
|
-
*
|
|
443
|
-
* KERNEL CONFIG
|
|
444
|
-
*
|
|
445
|
-
* Domain listen : Nodefony can listen only one domain ( no vhost )
|
|
446
|
-
* Example :
|
|
447
|
-
* domain : 0.0.0.0 // for all interfaces
|
|
448
|
-
* domain : [::1] // for IPV6 only
|
|
449
|
-
* domain : 192.168.1.1 // IPV4
|
|
450
|
-
* domain : mydomain.com // DNS
|
|
451
|
-
*
|
|
452
|
-
* Domain Alias : string only "<<regexp>>" use domainCheck : true
|
|
453
|
-
* Example :
|
|
454
|
-
* domainAlias:[
|
|
455
|
-
* "^127.0.0.1$",
|
|
456
|
-
* "^localhost$",
|
|
457
|
-
* ".*\\.nodefony\\.com",
|
|
458
|
-
* "^nodefony\\.eu$",
|
|
459
|
-
* "^.*\\.nodefony\\.eu$"
|
|
460
|
-
* ]
|
|
461
|
-
*/
|
|
462
|
-
const path = require("path");
|
|
463
|
-
|
|
464
|
-
module.exports = {
|
|
465
|
-
system: {
|
|
466
|
-
domain: "0.0.0.0",
|
|
467
|
-
domainAlias: [
|
|
468
|
-
"^127.0.0.1$",
|
|
469
|
-
"^localhost$"
|
|
470
|
-
],
|
|
471
|
-
httpPort: 5151,
|
|
472
|
-
httpsPort: 5152,
|
|
473
|
-
domainCheck: false,
|
|
474
|
-
locale: "en_en",
|
|
475
|
-
/**
|
|
476
|
-
* BUNDLES CORE
|
|
477
|
-
*/
|
|
478
|
-
security: true,
|
|
479
|
-
realtime: true,
|
|
480
|
-
monitoring: true,
|
|
481
|
-
mail: true,
|
|
482
|
-
documentation: false,
|
|
483
|
-
unitTest: true,
|
|
484
|
-
redis: false,
|
|
485
|
-
mongo: false,
|
|
486
|
-
elastic: false,
|
|
487
|
-
/**
|
|
488
|
-
* SERVERS
|
|
489
|
-
*/
|
|
490
|
-
servers: {
|
|
491
|
-
statics: true,
|
|
492
|
-
protocol: "2.0", // 2.0 || 1.1
|
|
493
|
-
http: true,
|
|
494
|
-
https: true,
|
|
495
|
-
ws: true,
|
|
496
|
-
wss: true,
|
|
497
|
-
certificats: {
|
|
498
|
-
key: path.resolve("config", "certificates", "server", "privkey.pem"),
|
|
499
|
-
cert: path.resolve("config", "certificates", "server", "fullchain.pem"),
|
|
500
|
-
ca: path.resolve("config", "certificates", "ca", "nodefony-root-ca.crt.pem"),
|
|
501
|
-
options: {
|
|
502
|
-
rejectUnauthorized: true
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
/**
|
|
507
|
-
* DEV SERVER
|
|
508
|
-
*/
|
|
509
|
-
devServer: {
|
|
510
|
-
inline: true,
|
|
511
|
-
hot: false,
|
|
512
|
-
hotOnly: false,
|
|
513
|
-
overlay: true,
|
|
514
|
-
logLevel: "info", // none, error, warning or info
|
|
515
|
-
progress: false,
|
|
516
|
-
protocol: "https",
|
|
517
|
-
websocket: true
|
|
518
|
-
},
|
|
519
|
-
/**
|
|
520
|
-
* BUNDLES LOCAL REGISTRATION
|
|
521
|
-
* Example :
|
|
522
|
-
* bundles: {
|
|
523
|
-
* hello-bundle : "file:src/bundles/hello-bundle",
|
|
524
|
-
* test-bundle : path.resolve("src","bundles","test-bundle")
|
|
525
|
-
* }
|
|
526
|
-
*/
|
|
527
|
-
bundles: {}
|
|
528
|
-
...
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
## <a name="bundles"></a>Quick Start
|
|
532
260
|
|
|
533
|
-
|
|
261
|
+
> **Note** : `set()`, `setParameters()` lèvent une erreur si le container est null (après `clean()`).
|
|
262
|
+
|
|
263
|
+
### Events
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
// Écouter
|
|
267
|
+
svc.on("myEvent", (data) => console.log(data));
|
|
268
|
+
svc.once("boot", () => console.log("booted once"));
|
|
269
|
+
svc.addListener("myEvent", handler);
|
|
270
|
+
svc.prependListener("myEvent", firstHandler); // exécuté avant les autres
|
|
271
|
+
|
|
272
|
+
// Émettre
|
|
273
|
+
svc.emit("myEvent", payload);
|
|
274
|
+
svc.fire("myEvent", payload); // alias emit
|
|
275
|
+
await svc.fireAsync("myEvent", data); // async, attend les handlers async
|
|
276
|
+
await svc.emitAsync("myEvent", data); // alias fireAsync
|
|
277
|
+
|
|
278
|
+
// Supprimer
|
|
279
|
+
svc.off("myEvent", handler);
|
|
280
|
+
svc.removeListener("myEvent", handler);
|
|
281
|
+
svc.removeAllListeners(); // vide tous les events
|
|
282
|
+
svc.removeAllListeners("myEvent"); // vide un event spécifique
|
|
283
|
+
|
|
284
|
+
// Introspection
|
|
285
|
+
svc.eventNames(); // ['myEvent', ...]
|
|
286
|
+
svc.listenerCount("myEvent"); // 2
|
|
287
|
+
svc.listeners("myEvent"); // [fn1, fn2]
|
|
288
|
+
svc.getMaxListeners(); // 10
|
|
289
|
+
svc.setMaxListeners(50);
|
|
290
|
+
|
|
291
|
+
// Auto-wire via options (clés onFoo)
|
|
292
|
+
svc.settingsToListen({ onReady: myHandler }, context);
|
|
293
|
+
|
|
294
|
+
// listen() — retourne une fonction fire
|
|
295
|
+
const fire = svc.listen("myEvent", handler);
|
|
296
|
+
fire(); // émet "myEvent"
|
|
534
297
|
```
|
|
535
|
-
$ npm -g install nodefony
|
|
536
|
-
```
|
|
537
|
-
[See Global install How to Prevent Permissions Errors](https://docs.npmjs.com/getting-started/fixing-npm-permissions)
|
|
538
298
|
|
|
539
|
-
|
|
540
|
-
```
|
|
541
|
-
$ nodefony create myproject
|
|
542
|
-
$ cd myproject
|
|
543
|
-
```
|
|
299
|
+
> Toutes les méthodes events lèvent `Error: notificationsCenter not initialized` si `notificationsCenter=false` ou après `clean()`.
|
|
544
300
|
|
|
545
|
-
###
|
|
301
|
+
### Logging
|
|
546
302
|
|
|
547
|
-
|
|
303
|
+
```typescript
|
|
304
|
+
// Niveaux disponibles (SysLogSeverity)
|
|
305
|
+
// EMERGENCY(0) ALERT(1) CRITIC(2) ERROR(3) WARNING(4) NOTICE(5) INFO(6) DEBUG(7)
|
|
548
306
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
$ nodefony
|
|
554
|
-
|
|
555
|
-
? Nodefony CLI : Generater
|
|
556
|
-
? Nodefony CLI : (Use arrow keys)
|
|
557
|
-
❯ Generate New Bundle
|
|
558
|
-
Generate New Controller
|
|
559
|
-
Generate New Service
|
|
560
|
-
Generate New Entity
|
|
561
|
-
Generate New Nodefony Project
|
|
562
|
-
Generate Openssl Certificates
|
|
563
|
-
Generate Haproxy Configuration
|
|
564
|
-
Generate Nginx Configuration
|
|
565
|
-
Generate letsEncrypt Webroot Configuration
|
|
566
|
-
--------
|
|
567
|
-
Quit
|
|
568
|
-
```
|
|
307
|
+
svc.log("message", "INFO");
|
|
308
|
+
svc.log("erreur", "ERROR", "MSGID", "détails");
|
|
309
|
+
svc.logger("debug payload"); // console.debug
|
|
310
|
+
svc.trace("trace payload"); // console.trace
|
|
569
311
|
|
|
570
|
-
|
|
312
|
+
// Pdu retourné
|
|
313
|
+
const pdu = svc.log("msg", "WARNING");
|
|
314
|
+
pdu.severityName; // "WARNING" (string)
|
|
315
|
+
pdu.severity; // 4 (numérique)
|
|
316
|
+
pdu.payload; // "msg"
|
|
317
|
+
pdu.msgid; // nom du service si msgid non fourni
|
|
318
|
+
pdu.timeStamp; // Date.now()
|
|
571
319
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
$ nodefony dev
|
|
320
|
+
// Initialiser le syslog (filtres par env/debug)
|
|
321
|
+
svc.initSyslog("production", false);
|
|
322
|
+
svc.initSyslog("development", true);
|
|
576
323
|
```
|
|
577
|
-
Access to bundle route with URL : <http://localhost:5151/hello>
|
|
578
|
-
|
|
579
|
-
Access to bundle route with URL : <https://localhost:5152/hello>
|
|
580
324
|
|
|
581
|
-
|
|
325
|
+
> **Attention** : le niveau s'appelle `"CRITIC"`, pas `"CRITICAL"`.
|
|
582
326
|
|
|
583
|
-
###
|
|
327
|
+
### Cycle de vie
|
|
584
328
|
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
* @class defaultController
|
|
588
|
-
* @constructor
|
|
589
|
-
* @param {class} container
|
|
590
|
-
* @param {class} context
|
|
591
|
-
* @Route ("/hello")
|
|
592
|
-
*/
|
|
593
|
-
class defaultController extends nodefony.Controller {
|
|
329
|
+
```typescript
|
|
330
|
+
svc.getName(); // "myService"
|
|
594
331
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* @Route ("",
|
|
603
|
-
* name="hello-route")
|
|
604
|
-
*/
|
|
605
|
-
indexAction() {
|
|
606
|
-
return this.render("hello-bundle::index.html.twig", {
|
|
607
|
-
name: this.bundle.name,
|
|
608
|
-
description: this.bundle.package.description
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
module.exports = defaultController;
|
|
332
|
+
// Nettoyage complet
|
|
333
|
+
svc.clean(); // container=null, kernel=null, syslog=null, #nc=undefined
|
|
334
|
+
svc.clean(true); // idem + syslog.reset() (vide le ring buffer)
|
|
335
|
+
svc.clean(false); // idem sans reset syslog
|
|
614
336
|
```
|
|
615
337
|
|
|
616
|
-
###
|
|
617
|
-
|
|
618
|
-
```twig
|
|
619
|
-
{% extends './base.html.twig' %}
|
|
620
|
-
{% set error = getFlashBag("error") %}
|
|
621
|
-
{% set info = getFlashBag("info") %}
|
|
622
|
-
{% block body %}
|
|
623
|
-
<div class="hello">
|
|
624
|
-
<img class=displayed src=/framework-bundle/images/nodefony-logo.png>
|
|
625
|
-
<h1>{{ name }}</h1>
|
|
626
|
-
<h2>{{ description }}</h2>
|
|
627
|
-
<img class="displayed" style=" width:10%; height:10%" src="/framework-bundle/images/nodejs/nodejs-new-pantone-black.png">
|
|
628
|
-
<img class="displayed" style=" width:15%; height:15%" src="/framework-bundle/images/webpack/webpack.svg">
|
|
629
|
-
</div>
|
|
630
|
-
{% endblock %}
|
|
631
|
-
|
|
632
|
-
```
|
|
633
|
-
|
|
634
|
-
### watchers :
|
|
635
|
-
|
|
636
|
-
#### The bundle generation engine build bundle config with node.js watcher configuration
|
|
637
|
-
|
|
638
|
-
#### In developement mode is very usefull to auto-reload files as controllers , views , routing , translations
|
|
639
|
-
|
|
640
|
-
#### without having to reboot the server.
|
|
641
|
-
|
|
642
|
-
You can see hello-bundle config : src/bundles/hello-bundle/Resources/config/config.js
|
|
643
|
-
|
|
644
|
-
```js
|
|
645
|
-
module.exports = {
|
|
646
|
-
locale : "en_en",
|
|
647
|
-
/**
|
|
648
|
-
* WATCHERS
|
|
649
|
-
*
|
|
650
|
-
* watchers Listen to changes, deletion, renaming of files and directories
|
|
651
|
-
* of different components
|
|
652
|
-
*
|
|
653
|
-
* For watch all components
|
|
654
|
-
* watch: true
|
|
655
|
-
* or
|
|
656
|
-
* watch:{
|
|
657
|
-
* controller: true,
|
|
658
|
-
* config: true, // only routing and services
|
|
659
|
-
* views: true,
|
|
660
|
-
* translations: true,
|
|
661
|
-
* webpack: true
|
|
662
|
-
* }
|
|
663
|
-
*
|
|
664
|
-
*/
|
|
665
|
-
watch: true,
|
|
666
|
-
|
|
667
|
-
/**
|
|
668
|
-
* DEV SERVER
|
|
669
|
-
*/
|
|
670
|
-
devServer: {
|
|
671
|
-
hot: false
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
```
|
|
675
|
-
|
|
676
|
-
### Webpack Module bundler :
|
|
677
|
-
|
|
678
|
-
#### The bundle generation engine build bundle config with a predefined webpack configuration
|
|
679
|
-
|
|
680
|
-
#### In this way webpack is very usefull to manage all assets of bundle
|
|
681
|
-
|
|
682
|
-
#### In developement mode watch is very usefull to auto-compile webpack module bundle
|
|
338
|
+
### Partage de container (scénario framework)
|
|
683
339
|
|
|
684
|
-
|
|
340
|
+
```typescript
|
|
341
|
+
const container = new Container();
|
|
342
|
+
const sA = new Service("serviceA", container);
|
|
343
|
+
const sB = new Service("serviceB", container);
|
|
685
344
|
|
|
686
|
-
|
|
345
|
+
// sA et sB partagent le même DI
|
|
346
|
+
sA.set("config", { port: 3000 });
|
|
347
|
+
sB.get("config"); // { port: 3000 }
|
|
687
348
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
//
|
|
691
|
-
const public = path.resolve(__dirname, "..", "public", "assets");
|
|
692
|
-
const publicPath = "/hello-bundle/assets/";
|
|
693
|
-
let wpconfig = null;
|
|
694
|
-
let dev = true;
|
|
695
|
-
if (kernel.environment === "dev") {
|
|
696
|
-
wpconfig = require("./webpack/webpack.dev.config.js");
|
|
697
|
-
} else {
|
|
698
|
-
wpconfig = require("./webpack/webpack.prod.config.js");
|
|
699
|
-
dev = false;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
module.exports = webpackMerge(config, {
|
|
703
|
-
//context: context,
|
|
704
|
-
target: "web",
|
|
705
|
-
entry: {
|
|
706
|
-
hello:["./Resources/js/hello.js"]
|
|
707
|
-
},
|
|
708
|
-
output: {
|
|
709
|
-
path: public,
|
|
710
|
-
publicPath: publicPath,
|
|
711
|
-
filename: "./js/[name].js",
|
|
712
|
-
library: "[name]",
|
|
713
|
-
libraryExport: "default"
|
|
714
|
-
},
|
|
715
|
-
externals: {...},
|
|
716
|
-
resolve: {...},
|
|
717
|
-
module: {...},
|
|
718
|
-
plugins: [...],
|
|
719
|
-
devServer: {
|
|
720
|
-
inline: true,
|
|
721
|
-
hot: false
|
|
722
|
-
}
|
|
723
|
-
});
|
|
349
|
+
// Kernel partagé
|
|
350
|
+
container.set("kernel", kernel);
|
|
351
|
+
// tous les services créés avec ce container récupèrent kernel automatiquement
|
|
724
352
|
```
|
|
725
353
|
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
Access to monitoring route with URL : <http://localhost:5151/nodefony>
|
|
729
|
-
|
|
730
|
-
[](https://nodefony.net/nodefony)
|
|
731
|
-
|
|
732
|
-
Monitoring in progress !!!
|
|
733
|
-
|
|
734
|
-
## Who Use Nodefony:
|
|
735
|
-
|
|
736
|
-
<p float="left">
|
|
737
|
-
<a href="https://www.sfr.fr" target="_blank">
|
|
738
|
-
<img src="https://raw.githubusercontent.com/nodefony/nodefony/master/tools/images/sfr.jpg"/>
|
|
739
|
-
</a>
|
|
740
|
-
     
|
|
741
|
-
<a href="https://www.sfr.fr" target="_blank">
|
|
742
|
-
<img src="https://raw.githubusercontent.com/nodefony/nodefony/master/tools/images/logo.png"/>
|
|
743
|
-
</a>
|
|
744
|
-
     
|
|
745
|
-
<a href="https://www.d-lake.fr" target="_blank">
|
|
746
|
-
<img src="https://raw.githubusercontent.com/nodefony/nodefony/dev/tools/images/d-lake.png"/>
|
|
747
|
-
</a>
|
|
748
|
-
     
|
|
749
|
-
<a href="https://emersya.com" target="_blank">
|
|
750
|
-
<img src="https://raw.githubusercontent.com/nodefony/nodefony/dev/tools/images/emersya.png"/>
|
|
751
|
-
</a>
|
|
752
|
-
</p>
|
|
354
|
+
### Partage de notificationsCenter
|
|
753
355
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
356
|
+
```typescript
|
|
357
|
+
const sharedNC = new Event();
|
|
358
|
+
const sA = new Service("sA", undefined, sharedNC);
|
|
359
|
+
const sB = new Service("sB", undefined, sharedNC);
|
|
758
360
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
- [PM2](https://github.com/Unitech/PM2/blob/master/ADVANCED_README.md)
|
|
764
|
-
- [WEBPACK](https://webpack.js.org/)
|
|
765
|
-
|
|
766
|
-
More informations **[Nodefony Documentation](https://nodefony.net/documentation)**
|
|
767
|
-
|
|
768
|
-
## <a name="authors"></a>Authors
|
|
769
|
-
|
|
770
|
-
- Christophe CAMENSULI [github/ccamensuli](https://github.com/ccamensuli)
|
|
771
|
-
|
|
772
|
-
## <a name="license"></a>License
|
|
773
|
-
|
|
774
|
-
[CeCILL-B](https://github.com/nodefony/nodefony/blob/master/LICENSE)
|
|
775
|
-
|
|
776
|
-
## <a name="demo"></a>Demo
|
|
361
|
+
sA.on("broadcast", handler);
|
|
362
|
+
sB.on("broadcast", handler);
|
|
363
|
+
sharedNC.emit("broadcast"); // les deux services reçoivent
|
|
364
|
+
```
|
|
777
365
|
|
|
778
|
-
|
|
366
|
+
### API complète — IService
|
|
367
|
+
|
|
368
|
+
<!-- prettier-ignore -->
|
|
369
|
+
| Méthode | Retour | Description |
|
|
370
|
+
| --- | --- | --- |
|
|
371
|
+
| `getName()` | `string` | Nom du service |
|
|
372
|
+
| `initSyslog(env, debug, opts?)` | `Syslog \| null` | Initialise le syslog |
|
|
373
|
+
| `clean(syslog?)` | `void` | Libère toutes les références |
|
|
374
|
+
| `log(pci, sev?, msgid?, msg?)` | `Pdu` | Log structuré |
|
|
375
|
+
| `logger(pci, ...args)` | `void` | console.debug |
|
|
376
|
+
| `trace(pci, ...args)` | `void` | console.trace |
|
|
377
|
+
| `get<T>(name)` | `T \| null` | Récupère du container |
|
|
378
|
+
| `set<T>(name, obj)` | `void` | Stocke dans le container |
|
|
379
|
+
| `has(name)` | `boolean` | Vérifie dans le container |
|
|
380
|
+
| `remove(name)` | `boolean` | Supprime du container (toujours `false`) |
|
|
381
|
+
| `getParameters(name)` | `DynamicParam \| null` | Paramètre dot-notation |
|
|
382
|
+
| `setParameters(name, val)` | `DynamicParam \| null` | Définit paramètre |
|
|
383
|
+
| `on/off/once/emit/fire/...` | `this \| boolean` | Events (délégation EventEmitter) |
|
|
384
|
+
|
|
385
|
+
### Comportements à connaître (gotchas)
|
|
386
|
+
|
|
387
|
+
| Comportement | Détail |
|
|
388
|
+
| ------------------------------------ | -------------------------------------------------------------- |
|
|
389
|
+
| `remove()` retourne `false` | Toujours, même si suppression réussie |
|
|
390
|
+
| `events.nbListeners` ignoré | Seulement appliqué si Event partagé passé au constructeur |
|
|
391
|
+
| `pdu.severity` vs `pdu.severityName` | Numérique vs string — utiliser `severityName` pour comparer |
|
|
392
|
+
| `"CRITIC"` pas `"CRITICAL"` | Nom exact dans l'enum SysLogSeverity |
|
|
393
|
+
| `removeAllListeners()` | Corrigé — `(undefined)` ne vidait pas (bug `arguments.length`) |
|
|
394
|
+
| Events après `clean()` | Tous throw `notificationsCenter not initialized` |
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Syslog / Pdu
|
|
399
|
+
|
|
400
|
+
Voir [`src/syslog/`](https://github.com/nodefony/nodefony-core/tree/main/src/nodefony/src/syslog) — logger structuré RFC 5424 avec ring buffer O(1).
|