rlz-engine 1.0.57 → 1.0.58
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 +15 -8
- package/dist/back/certificate/cli.d.ts +3 -0
- package/dist/back/certificate/cli.js +17 -0
- package/dist/back/certificate/cli.js.map +1 -0
- package/dist/back/certificate/module.d.ts +2 -0
- package/dist/back/certificate/module.js +2 -0
- package/dist/back/certificate/module.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,14 +29,15 @@ import { syncItems } from 'rlz-engine/client/sync.js'
|
|
|
29
29
|
|
|
30
30
|
Each backend feature lives in a cohesive directory and exposes an uppercase `<FEATURE>_MODULE` object from `module.ts`. The object contains only the integration factories that feature supports. Applications invoke the factories for the integrations they want, then pass the returned facet values to `composeModules()`.
|
|
31
31
|
|
|
32
|
-
| Module
|
|
33
|
-
|
|
|
34
|
-
| `AUTH_MODULE`
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
32
|
+
| Module | Facets | Purpose |
|
|
33
|
+
| -------------------- | ----------------------------------------- | ------------------------------------------------------------------- |
|
|
34
|
+
| `AUTH_MODULE` | `makeRpc(storage, options?)`, `makeCli()` | Signup/signin/session/logout RPC endpoints and admin secret command |
|
|
35
|
+
| `CERTIFICATE_MODULE` | `makeCli()`, `makeAdmRpc()`, `makeAdm()` | ACME account registration and certificate status |
|
|
36
|
+
| `HTTP_MODULE` | `makeCli(params, options?)` | `http start` server command |
|
|
37
|
+
| `LOGGER_MODULE` | `makeCli()`, `makeAdmRpc()` | Audit-log reader command and protected audit query endpoint |
|
|
38
|
+
| `RPC_MODULE` | `makeDevCli(options)` | Generate user and administrative RPC clients during development |
|
|
38
39
|
|
|
39
|
-
The composer groups selected operational CLI, development CLI, user RPC, and administrative RPC facets. It rejects duplicate names within each facet kind before startup. It deliberately leaves factory arguments with the application: server settings, route handlers, working directories, and generated-client paths are application-specific. The React administration UI and certificate-status module
|
|
40
|
+
The composer groups selected operational CLI, development CLI, user RPC, and administrative RPC facets. It rejects duplicate names within each facet kind before startup. It deliberately leaves factory arguments with the application: server settings, route handlers, working directories, and generated-client paths are application-specific. The React administration UI, audit-log viewer, and certificate-status module are available as opt-in modules.
|
|
40
41
|
|
|
41
42
|
### CLI composition
|
|
42
43
|
|
|
@@ -46,6 +47,7 @@ The composer groups selected operational CLI, development CLI, user RPC, and adm
|
|
|
46
47
|
import { CliEngine, DevCliEngine } from 'rlz-engine/back/cli/cli-engine.js'
|
|
47
48
|
import { composeModules } from 'rlz-engine/back/module/composer.js'
|
|
48
49
|
import { AUTH_MODULE } from 'rlz-engine/back/auth/module.js'
|
|
50
|
+
import { CERTIFICATE_MODULE } from 'rlz-engine/back/certificate/module.js'
|
|
49
51
|
import { HTTP_MODULE } from 'rlz-engine/back/http/module.js'
|
|
50
52
|
import { LOGGER_MODULE } from 'rlz-engine/back/logger/module.js'
|
|
51
53
|
import { RPC_MODULE } from 'rlz-engine/back/rpc/module.js'
|
|
@@ -55,7 +57,12 @@ const applicationPlugin = async (server) => {
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
const applicationModules = composeModules({
|
|
58
|
-
cli: [
|
|
60
|
+
cli: [
|
|
61
|
+
AUTH_MODULE.makeCli(),
|
|
62
|
+
CERTIFICATE_MODULE.makeCli(),
|
|
63
|
+
HTTP_MODULE.makeCli(serverParams, { plugins: [applicationPlugin] }),
|
|
64
|
+
LOGGER_MODULE.makeCli()
|
|
65
|
+
],
|
|
59
66
|
rpc: userRpcPlugins,
|
|
60
67
|
admRpc: [LOGGER_MODULE.makeAdmRpc()]
|
|
61
68
|
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { registerAcmeAccountCli } from 'fastify-acme';
|
|
2
|
+
/** Create the ACME account registration command. */
|
|
3
|
+
export function makeCertificateCli() {
|
|
4
|
+
return {
|
|
5
|
+
name: 'certificates',
|
|
6
|
+
description: 'Manage server certificate setup.',
|
|
7
|
+
commands: {
|
|
8
|
+
'register-acme': {
|
|
9
|
+
description: 'Register the ACME account used for TLS certificates.',
|
|
10
|
+
handler: async () => {
|
|
11
|
+
await registerAcmeAccountCli();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/back/certificate/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAIrD,oDAAoD;AACpD,MAAM,UAAU,kBAAkB;IAC9B,OAAO;QACH,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,kCAAkC;QAC/C,QAAQ,EAAE;YACN,eAAe,EAAE;gBACb,WAAW,EAAE,sDAAsD;gBACnE,OAAO,EAAE,KAAK,IAAI,EAAE;oBAChB,MAAM,sBAAsB,EAAE,CAAA;gBAClC,CAAC;aACJ;SACJ;KACJ,CAAA;AACL,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AdmModule } from '../../client/adm/admin.js';
|
|
2
2
|
import { makeCertificateAdmRpc } from './adm-rpc.js';
|
|
3
|
+
import { makeCertificateCli } from './cli.js';
|
|
3
4
|
export interface CertificateModuleOptions {
|
|
4
5
|
certDir: string;
|
|
5
6
|
domain: string;
|
|
@@ -7,6 +8,7 @@ export interface CertificateModuleOptions {
|
|
|
7
8
|
declare function makeAdm(): AdmModule;
|
|
8
9
|
/** TLS certificate status integrations. */
|
|
9
10
|
export declare const CERTIFICATE_MODULE: {
|
|
11
|
+
makeCli: typeof makeCertificateCli;
|
|
10
12
|
makeAdmRpc: typeof makeCertificateAdmRpc;
|
|
11
13
|
makeAdm: typeof makeAdm;
|
|
12
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { admRpcCall } from '../../client/rpc.js';
|
|
2
2
|
import { CertificateStatus } from '../../client/adm/certificate.js';
|
|
3
3
|
import { makeCertificateAdmRpc } from './adm-rpc.js';
|
|
4
|
+
import { makeCertificateCli } from './cli.js';
|
|
4
5
|
function makeAdm() {
|
|
5
6
|
return {
|
|
6
7
|
name: 'certificate',
|
|
@@ -13,6 +14,7 @@ function makeAdm() {
|
|
|
13
14
|
}
|
|
14
15
|
/** TLS certificate status integrations. */
|
|
15
16
|
export const CERTIFICATE_MODULE = {
|
|
17
|
+
makeCli: makeCertificateCli,
|
|
16
18
|
makeAdmRpc: makeCertificateAdmRpc,
|
|
17
19
|
makeAdm
|
|
18
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/back/certificate/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/back/certificate/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAO7C,SAAS,OAAO;IACZ,OAAO;QACH,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,iBAAiB;QAC5B,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACnB,MAAM,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;QAC1D,CAAC;KACJ,CAAA;AACL,CAAC;AAED,2CAA2C;AAC3C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,OAAO,EAAE,kBAAkB;IAC3B,UAAU,EAAE,qBAAqB;IACjC,OAAO;CACV,CAAA"}
|