rlz-engine 1.0.56 → 1.0.57
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/README.md +13 -16
- package/dist/back/http/module.d.ts +13 -3
- package/dist/back/http/module.js +13 -5
- package/dist/back/http/module.js.map +1 -1
- package/dist/back/http/server.d.ts +4 -4
- package/dist/back/http/server.js +8 -3
- package/dist/back/http/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Each backend feature lives in a cohesive directory and exposes an uppercase `<FE
|
|
|
32
32
|
| Module | Facets | Purpose |
|
|
33
33
|
| --------------- | ----------------------------------------- | ------------------------------------------------------------------- |
|
|
34
34
|
| `AUTH_MODULE` | `makeRpc(storage, options?)`, `makeCli()` | Signup/signin/session/logout RPC endpoints and admin secret command |
|
|
35
|
-
| `HTTP_MODULE` | `makeCli(params,
|
|
35
|
+
| `HTTP_MODULE` | `makeCli(params, options?)` | `http start` server command |
|
|
36
36
|
| `LOGGER_MODULE` | `makeCli()`, `makeAdmRpc()` | Audit-log reader command and protected audit query endpoint |
|
|
37
37
|
| `RPC_MODULE` | `makeDevCli(options)` | Generate user and administrative RPC clients during development |
|
|
38
38
|
|
|
@@ -50,8 +50,12 @@ import { HTTP_MODULE } from 'rlz-engine/back/http/module.js'
|
|
|
50
50
|
import { LOGGER_MODULE } from 'rlz-engine/back/logger/module.js'
|
|
51
51
|
import { RPC_MODULE } from 'rlz-engine/back/rpc/module.js'
|
|
52
52
|
|
|
53
|
+
const applicationPlugin = async (server) => {
|
|
54
|
+
await server.register(applicationRoutes)
|
|
55
|
+
}
|
|
56
|
+
|
|
53
57
|
const applicationModules = composeModules({
|
|
54
|
-
cli: [AUTH_MODULE.makeCli(), HTTP_MODULE.makeCli(serverParams,
|
|
58
|
+
cli: [AUTH_MODULE.makeCli(), HTTP_MODULE.makeCli(serverParams, { plugins: [applicationPlugin] }), LOGGER_MODULE.makeCli()],
|
|
55
59
|
rpc: userRpcPlugins,
|
|
56
60
|
admRpc: [LOGGER_MODULE.makeAdmRpc()]
|
|
57
61
|
})
|
|
@@ -59,12 +63,6 @@ const applicationModules = composeModules({
|
|
|
59
63
|
const cli = applicationModules.registerCli(new CliEngine('app.js'))
|
|
60
64
|
await cli.run()
|
|
61
65
|
|
|
62
|
-
async function initializeRoutes(server) {
|
|
63
|
-
await applicationModules.registerRpc(server)
|
|
64
|
-
await applicationModules.registerAdmRpc(server)
|
|
65
|
-
// Register application-owned routes and plugins here.
|
|
66
|
-
}
|
|
67
|
-
|
|
68
66
|
const devModules = composeModules({
|
|
69
67
|
devCli: [
|
|
70
68
|
RPC_MODULE.makeDevCli({
|
|
@@ -81,7 +79,7 @@ await devCli.run()
|
|
|
81
79
|
|
|
82
80
|
`composeModules()` accepts any combination of `cli`, `devCli`, `rpc`, and `admRpc` arrays; omit facets the application does not use. For RPC builders that need Fastify plugin options, provide `rpcOptions` or `admRpcOptions`, keyed by each builder's `name` (for example, `{ audit: { workingDirectory: appDirectory } }`). The returned object has `registerCli()`, `registerDevCli()`, `registerRpc()`, and `registerAdmRpc()` methods. RPC registration methods are asynchronous and register plugins in array order. Duplicate module or plugin names within the same category throw during composition. Operational and development commands remain separate so client generation does not need to be included in production command setup. Each engine generates nested help from module and command descriptions. For example, `app.js --help`, `app.js http --help`, and `app.js http start --help` show progressively narrower command help.
|
|
83
81
|
|
|
84
|
-
`AUTH_MODULE.makeRpc(storage, options?)` requires an initialized `AuthStorage` and returns the authentication RPC builder. `AUTH_MODULE.makeCli(workingDirectory?)` accepts a directory or a callback returning one; it defaults to the current working directory. `HTTP_MODULE.makeCli(params,
|
|
82
|
+
`AUTH_MODULE.makeRpc(storage, options?)` requires an initialized `AuthStorage` and returns the authentication RPC builder. `AUTH_MODULE.makeCli(workingDirectory?)` accepts a directory or a callback returning one; it defaults to the current working directory. `HTTP_MODULE.makeCli(params, options?)` accepts `RunServerParams` without `plugins`, or a callback that returns those settings. `options.plugins` lists Fastify plugins registered on each server; no server initialization callback is needed. `options.before` runs after settings resolve and before server startup; `options.after` runs after the server is listening and receives its shutdown function. If `before` fails, the server is not started. If `after` fails, the module shuts down the server before rethrowing. These hooks let applications attach lifecycle work without replacing the built-in HTTP command. `LOGGER_MODULE.makeCli(workingDirectory?)` accepts the directory containing `logs.sqlite` and defaults to the current working directory. `RPC_MODULE.makeDevCli(options)` requires at least one user or administrative RPC builder and an output path for each configured builder kind.
|
|
85
83
|
|
|
86
84
|
## HTTP server
|
|
87
85
|
|
|
@@ -95,13 +93,11 @@ await runServer({
|
|
|
95
93
|
domain: 'example.com',
|
|
96
94
|
certDir: './certs',
|
|
97
95
|
staticDir: './dist',
|
|
98
|
-
|
|
99
|
-
// Register application routes and plugins here.
|
|
100
|
-
}
|
|
96
|
+
plugins: [applicationPlugin]
|
|
101
97
|
})
|
|
102
98
|
```
|
|
103
99
|
|
|
104
|
-
`domain`, `certDir`,
|
|
100
|
+
`domain`, `certDir`, and `staticDir` are required. Optional settings include `debug`, `unsecurePort`, `securePort`, `auditRetentionMs`, `auditMaxRecords`, `auditSqlite`, `acmeProvider`, and `plugins`. Development serves HTTP with CORS and static files. Production runs an HTTP-01 challenge and redirect server alongside a TLS server with HTTP/2 and HTTP/1 support, and renews certificates periodically. CORS is available only in development and does not allow credentials; production serves static files and RPC from the same HTTPS origin. The returned shutdown function closes the servers and logging storage. The `http start` CLI command keeps the process active until a termination signal.
|
|
105
101
|
|
|
106
102
|
By default, non-debug production writes audit logs to `logs.sqlite`. Development and debug mode use colored console output. Set `auditSqlite: true` (or pass `--audit-sqlite` to `http start`) to write SQLite records alongside console output. Retention defaults to 30 days and the maximum record count defaults to 100,000.
|
|
107
103
|
|
|
@@ -137,11 +133,12 @@ export const adminRpc = admRpc('operations').add({
|
|
|
137
133
|
})
|
|
138
134
|
```
|
|
139
135
|
|
|
140
|
-
|
|
136
|
+
Pass the generated Fastify plugins to `HTTP_MODULE`; the engine registers them on both development and production servers:
|
|
141
137
|
|
|
142
138
|
```ts
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
HTTP_MODULE.makeCli(serverParams, {
|
|
140
|
+
plugins: [userRpc.makeFastifyPlugin(), adminRpc.makeFastifyPlugin()]
|
|
141
|
+
})
|
|
145
142
|
```
|
|
146
143
|
|
|
147
144
|
User endpoints are served at `/rpc/<plugin>_<endpoint>_v<version>`. Authenticated user routes use cookie sessions and require both a session authenticator and a CSRF verifier.
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FastifyPluginAsync, FastifyPluginCallback } from 'fastify';
|
|
2
|
+
import { RunServerParams } from './server.js';
|
|
2
3
|
import { CliModule } from '../cli/cli-engine.js';
|
|
3
|
-
|
|
4
|
+
export type HttpServerShutdown = () => Promise<void>;
|
|
5
|
+
export interface HttpModuleOptions {
|
|
6
|
+
/** Fastify plugins registered on each server before application routes. */
|
|
7
|
+
plugins?: readonly (FastifyPluginAsync | FastifyPluginCallback)[];
|
|
8
|
+
/** Runs after resolving server settings and before creating the server. */
|
|
9
|
+
before?: () => void | Promise<void>;
|
|
10
|
+
/** Runs after the server is listening. */
|
|
11
|
+
after?: (shutdown: HttpServerShutdown) => void | Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/** Fastify lifecycle feature; applications provide deployment settings and plugins. */
|
|
4
14
|
export declare const HTTP_MODULE: {
|
|
5
15
|
/** Create the `http start` command using application-owned server configuration. */
|
|
6
|
-
makeCli(params: Omit<RunServerParams, '
|
|
16
|
+
makeCli(params: Omit<RunServerParams, 'plugins'> | (() => Omit<RunServerParams, 'plugins'>), options?: HttpModuleOptions): CliModule;
|
|
7
17
|
};
|
package/dist/back/http/module.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { flag } from 'cmd-ts';
|
|
2
2
|
import { runServer } from './server.js';
|
|
3
|
-
/** Fastify lifecycle feature; applications provide deployment settings and
|
|
3
|
+
/** Fastify lifecycle feature; applications provide deployment settings and plugins. */
|
|
4
4
|
export const HTTP_MODULE = {
|
|
5
5
|
/** Create the `http start` command using application-owned server configuration. */
|
|
6
|
-
makeCli(params,
|
|
6
|
+
makeCli(params, options = {}) {
|
|
7
7
|
return {
|
|
8
8
|
name: 'http',
|
|
9
9
|
description: 'Start the application HTTP server.',
|
|
10
10
|
commands: {
|
|
11
11
|
start: {
|
|
12
|
-
description: 'Start the Fastify server using the deployment settings and
|
|
12
|
+
description: 'Start the Fastify server using the deployment settings and plugins supplied by the application. The process remains active until it receives a termination signal.',
|
|
13
13
|
args: {
|
|
14
14
|
debug: flag({ long: 'debug', description: 'Enable debug logging.' }),
|
|
15
15
|
auditSqlite: flag({
|
|
@@ -19,12 +19,20 @@ export const HTTP_MODULE = {
|
|
|
19
19
|
},
|
|
20
20
|
handler: async ({ debug, auditSqlite }) => {
|
|
21
21
|
const serverParams = typeof params === 'function' ? params() : params;
|
|
22
|
-
await
|
|
22
|
+
await options.before?.();
|
|
23
|
+
const shutdown = await runServer({
|
|
23
24
|
...serverParams,
|
|
24
25
|
debug: debug || serverParams.debug,
|
|
25
26
|
auditSqlite: auditSqlite || serverParams.auditSqlite,
|
|
26
|
-
|
|
27
|
+
plugins: options.plugins
|
|
27
28
|
});
|
|
29
|
+
try {
|
|
30
|
+
await options.after?.(shutdown);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
await shutdown();
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
28
36
|
}
|
|
29
37
|
}
|
|
30
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/back/http/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/back/http/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAG7B,OAAO,EAAmB,SAAS,EAAE,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
import { FastifyPluginAsync, FastifyPluginCallback } from 'fastify';
|
|
2
2
|
import { type AcmeProvider } from 'fastify-acme';
|
|
3
|
-
export type InitServerFuncType = <S extends RawServerBase>(server: FastifyInstance<S, RawRequestDefaultExpression<S>, RawReplyDefaultExpression<S>, FastifyBaseLogger>) => Promise<void>;
|
|
4
3
|
export interface RunServerParams {
|
|
5
4
|
production: boolean;
|
|
6
5
|
debug?: boolean;
|
|
@@ -17,6 +16,7 @@ export interface RunServerParams {
|
|
|
17
16
|
/** Certificate authority used for ACME issuance and renewal. Defaults to Let's Encrypt. */
|
|
18
17
|
acmeProvider?: AcmeProvider;
|
|
19
18
|
staticDir: string;
|
|
20
|
-
|
|
19
|
+
/** Application routes and integrations, installed on each server instance. */
|
|
20
|
+
plugins?: readonly (FastifyPluginAsync | FastifyPluginCallback)[];
|
|
21
21
|
}
|
|
22
|
-
export declare function runServer({ production, debug, domain, certDir, auditRetentionMs, auditMaxRecords, auditSqlite, acmeProvider, staticDir, securePort, unsecurePort,
|
|
22
|
+
export declare function runServer({ production, debug, domain, certDir, auditRetentionMs, auditMaxRecords, auditSqlite, acmeProvider, staticDir, securePort, unsecurePort, plugins }: RunServerParams): Promise<() => Promise<void>>;
|
package/dist/back/http/server.js
CHANGED
|
@@ -15,7 +15,7 @@ import { getSystemLogger } from '../logger/system-logger.js';
|
|
|
15
15
|
const DEFAULT_AUDIT_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
|
|
16
16
|
const DEFAULT_AUDIT_MAX_RECORDS = 100_000;
|
|
17
17
|
installIntoGlobal();
|
|
18
|
-
export async function runServer({ production, debug = false, domain, certDir, auditRetentionMs = DEFAULT_AUDIT_RETENTION_MS, auditMaxRecords = DEFAULT_AUDIT_MAX_RECORDS, auditSqlite = false, acmeProvider, staticDir, securePort, unsecurePort,
|
|
18
|
+
export async function runServer({ production, debug = false, domain, certDir, auditRetentionMs = DEFAULT_AUDIT_RETENTION_MS, auditMaxRecords = DEFAULT_AUDIT_MAX_RECORDS, auditSqlite = false, acmeProvider, staticDir, securePort, unsecurePort, plugins = [] }) {
|
|
19
19
|
const sqliteConfig = { path: path.resolve('logs.sqlite'), retentionMs: auditRetentionMs, maxRecords: auditMaxRecords };
|
|
20
20
|
const auditLoggerConfig = production && !debug
|
|
21
21
|
? { mode: 'sqlite', ...sqliteConfig }
|
|
@@ -43,7 +43,7 @@ export async function runServer({ production, debug = false, domain, certDir, au
|
|
|
43
43
|
await httpServer.register(fastifyResponseValidation, {
|
|
44
44
|
ajv: { plugins: [configureAjvFormats], useDefaults: false, coerceTypes: false, allErrors: true, verbose: true }
|
|
45
45
|
});
|
|
46
|
-
await
|
|
46
|
+
await registerPlugins(httpServer, plugins);
|
|
47
47
|
addStaticEndpoints(httpServer, staticDir);
|
|
48
48
|
await httpServer.listen({ port: unsecurePort ?? 8080 });
|
|
49
49
|
return async () => {
|
|
@@ -84,7 +84,7 @@ export async function runServer({ production, debug = false, domain, certDir, au
|
|
|
84
84
|
await httpsServer.register(fastifyResponseValidation, {
|
|
85
85
|
ajv: { plugins: [configureAjvFormats], useDefaults: false, coerceTypes: false, allErrors: true, verbose: true }
|
|
86
86
|
});
|
|
87
|
-
await
|
|
87
|
+
await registerPlugins(httpsServer, plugins);
|
|
88
88
|
httpsServer.all('/rpc/*', async () => {
|
|
89
89
|
return httpErrors.notFound();
|
|
90
90
|
});
|
|
@@ -105,6 +105,11 @@ export async function runServer({ production, debug = false, domain, certDir, au
|
|
|
105
105
|
throw error;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
+
async function registerPlugins(server, plugins) {
|
|
109
|
+
for (const plugin of plugins) {
|
|
110
|
+
await server.register(plugin);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
108
113
|
function addStaticEndpoints(server, staticPath) {
|
|
109
114
|
const absStaticPath = path.resolve(staticPath);
|
|
110
115
|
const absIndexPath = path.join(absStaticPath, 'index.html');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/back/http/server.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,eAAe,EAAE,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/back/http/server.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,eAAe,EAAE,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,OAQN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAqB,uBAAuB,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACnH,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAA;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAA0B,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,MAAM,0BAA0B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAC3D,MAAM,yBAAyB,GAAG,OAAO,CAAA;AAEzC,iBAAiB,E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