ddd-ts-kit 0.110.1 → 0.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/README.fr.md +7 -5
- package/README.md +6 -4
- package/dist/check/explain/tenancy-docs.d.ts.map +1 -1
- package/dist/check/explain/tenancy-docs.js +3 -1
- package/dist/check/explain/tenancy-docs.js.map +1 -1
- package/dist/check/fixtures/tenancy-advisory-lock-fixtures.d.ts +9 -0
- package/dist/check/fixtures/tenancy-advisory-lock-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/tenancy-advisory-lock-fixtures.js +45 -0
- package/dist/check/fixtures/tenancy-advisory-lock-fixtures.js.map +1 -0
- package/dist/check/fixtures/tenancy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/tenancy-fixtures.js +2 -0
- package/dist/check/fixtures/tenancy-fixtures.js.map +1 -1
- package/dist/check/rules/privacy-declared-field.js +1 -1
- package/dist/check/rules/privacy-declared-field.js.map +1 -1
- package/dist/check/rules/tenancy-scoped-statement.d.ts.map +1 -1
- package/dist/check/rules/tenancy-scoped-statement.js +11 -3
- package/dist/check/rules/tenancy-scoped-statement.js.map +1 -1
- package/dist/commands/generate.js +2 -0
- package/dist/commands/generate.js.map +1 -1
- package/dist/context-layout/context-layout.d.ts.map +1 -1
- package/dist/context-layout/context-layout.js +6 -0
- package/dist/context-layout/context-layout.js.map +1 -1
- package/dist/context-layout/module-moves.d.ts +8 -0
- package/dist/context-layout/module-moves.d.ts.map +1 -1
- package/dist/context-layout/module-moves.js +14 -3
- package/dist/context-layout/module-moves.js.map +1 -1
- package/dist/context-layout/runner-configs-by-hand.d.ts.map +1 -1
- package/dist/context-layout/runner-configs-by-hand.js +12 -0
- package/dist/context-layout/runner-configs-by-hand.js.map +1 -1
- package/dist/context-layout/settle.d.ts +9 -0
- package/dist/context-layout/settle.d.ts.map +1 -1
- package/dist/context-layout/settle.js +25 -3
- package/dist/context-layout/settle.js.map +1 -1
- package/dist/describe/read-adapters.d.ts.map +1 -1
- package/dist/describe/read-adapters.js +5 -1
- package/dist/describe/read-adapters.js.map +1 -1
- package/dist/describe/read-ports.js +8 -1
- package/dist/describe/read-ports.js.map +1 -1
- package/dist/generate/generate-options.d.ts +7 -0
- package/dist/generate/generate-options.d.ts.map +1 -1
- package/dist/generate/generate-options.js +2 -0
- package/dist/generate/generate-options.js.map +1 -1
- package/dist/generate/kind.d.ts +4 -0
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +12 -0
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.js +3 -57
- package/dist/generate/kinds/declare-storage.js.map +1 -1
- package/dist/generate/kinds/declare-table.d.ts +14 -0
- package/dist/generate/kinds/declare-table.d.ts.map +1 -0
- package/dist/generate/kinds/declare-table.js +72 -0
- package/dist/generate/kinds/declare-table.js.map +1 -0
- package/dist/generate/kinds/e2e/job-slug.d.ts +3 -0
- package/dist/generate/kinds/e2e/job-slug.d.ts.map +1 -0
- package/dist/generate/kinds/e2e/job-slug.js +8 -0
- package/dist/generate/kinds/e2e/job-slug.js.map +1 -0
- package/dist/generate/kinds/e2e/job-spec.d.ts +16 -0
- package/dist/generate/kinds/e2e/job-spec.d.ts.map +1 -0
- package/dist/generate/kinds/e2e/job-spec.js +54 -0
- package/dist/generate/kinds/e2e/job-spec.js.map +1 -0
- package/dist/generate/kinds/e2e/jobs-sending.d.ts +17 -5
- package/dist/generate/kinds/e2e/jobs-sending.d.ts.map +1 -1
- package/dist/generate/kinds/e2e/jobs-sending.js +15 -6
- package/dist/generate/kinds/e2e/jobs-sending.js.map +1 -1
- package/dist/generate/kinds/e2e/reaction-of.d.ts +5 -5
- package/dist/generate/kinds/e2e/reaction-of.d.ts.map +1 -1
- package/dist/generate/kinds/e2e/reaction-of.js +15 -8
- package/dist/generate/kinds/e2e/reaction-of.js.map +1 -1
- package/dist/generate/kinds/e2e/starting-jobs.d.ts +10 -0
- package/dist/generate/kinds/e2e/starting-jobs.d.ts.map +1 -0
- package/dist/generate/kinds/e2e/starting-jobs.js +33 -0
- package/dist/generate/kinds/e2e/starting-jobs.js.map +1 -0
- package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
- package/dist/generate/kinds/e2e-kind.js +47 -35
- package/dist/generate/kinds/e2e-kind.js.map +1 -1
- package/dist/generate/kinds/generate-repository.d.ts +8 -0
- package/dist/generate/kinds/generate-repository.d.ts.map +1 -1
- package/dist/generate/kinds/generate-repository.js +2 -13
- package/dist/generate/kinds/generate-repository.js.map +1 -1
- package/dist/generate/kinds/note-the-migration.d.ts +4 -0
- package/dist/generate/kinds/note-the-migration.d.ts.map +1 -0
- package/dist/generate/kinds/note-the-migration.js +13 -0
- package/dist/generate/kinds/note-the-migration.js.map +1 -0
- package/dist/generate/kinds/personal-data/columns-of-table.d.ts +18 -0
- package/dist/generate/kinds/personal-data/columns-of-table.d.ts.map +1 -0
- package/dist/generate/kinds/personal-data/columns-of-table.js +31 -0
- package/dist/generate/kinds/personal-data/columns-of-table.js.map +1 -0
- package/dist/generate/kinds/personal-data/declare-personal-data.d.ts.map +1 -1
- package/dist/generate/kinds/personal-data/declare-personal-data.js +7 -52
- package/dist/generate/kinds/personal-data/declare-personal-data.js.map +1 -1
- package/dist/generate/kinds/personal-data/declare-table-personal-fields.d.ts +11 -0
- package/dist/generate/kinds/personal-data/declare-table-personal-fields.d.ts.map +1 -0
- package/dist/generate/kinds/personal-data/declare-table-personal-fields.js +71 -0
- package/dist/generate/kinds/personal-data/declare-table-personal-fields.js.map +1 -0
- package/dist/generate/kinds/personal-data/personal-request-of-table.d.ts +11 -0
- package/dist/generate/kinds/personal-data/personal-request-of-table.d.ts.map +1 -0
- package/dist/generate/kinds/personal-data/personal-request-of-table.js +20 -0
- package/dist/generate/kinds/personal-data/personal-request-of-table.js.map +1 -0
- package/dist/generate/kinds/personal-data/personal-vars.d.ts +7 -0
- package/dist/generate/kinds/personal-data/personal-vars.d.ts.map +1 -1
- package/dist/generate/kinds/personal-data/personal-vars.js +14 -11
- package/dist/generate/kinds/personal-data/personal-vars.js.map +1 -1
- package/dist/generate/kinds/personal-data/schema-table.d.ts +13 -0
- package/dist/generate/kinds/personal-data/schema-table.d.ts.map +1 -0
- package/dist/generate/kinds/personal-data/schema-table.js +2 -0
- package/dist/generate/kinds/personal-data/schema-table.js.map +1 -0
- package/dist/generate/kinds/personal-data/schema-tables-of.d.ts +9 -0
- package/dist/generate/kinds/personal-data/schema-tables-of.d.ts.map +1 -0
- package/dist/generate/kinds/personal-data/schema-tables-of.js +78 -0
- package/dist/generate/kinds/personal-data/schema-tables-of.js.map +1 -0
- package/dist/generate/kinds/personal-data/table-of-schema.d.ts +15 -0
- package/dist/generate/kinds/personal-data/table-of-schema.d.ts.map +1 -0
- package/dist/generate/kinds/personal-data/table-of-schema.js +39 -0
- package/dist/generate/kinds/personal-data/table-of-schema.js.map +1 -0
- package/dist/generate/kinds/personal-data/write-personal-declaration.d.ts +20 -0
- package/dist/generate/kinds/personal-data/write-personal-declaration.d.ts.map +1 -0
- package/dist/generate/kinds/personal-data/write-personal-declaration.js +63 -0
- package/dist/generate/kinds/personal-data/write-personal-declaration.js.map +1 -0
- package/dist/generate/kinds/personal-fields-kind.d.ts +3 -0
- package/dist/generate/kinds/personal-fields-kind.d.ts.map +1 -0
- package/dist/generate/kinds/personal-fields-kind.js +15 -0
- package/dist/generate/kinds/personal-fields-kind.js.map +1 -0
- package/dist/generate/kinds/projection-kind.d.ts.map +1 -1
- package/dist/generate/kinds/projection-kind.js +2 -1
- package/dist/generate/kinds/projection-kind.js.map +1 -1
- package/dist/generate/kinds/read-model/field-lines.d.ts +11 -0
- package/dist/generate/kinds/read-model/field-lines.d.ts.map +1 -0
- package/dist/generate/kinds/read-model/field-lines.js +85 -0
- package/dist/generate/kinds/read-model/field-lines.js.map +1 -0
- package/dist/generate/kinds/read-model/live-rows-check.d.ts +22 -0
- package/dist/generate/kinds/read-model/live-rows-check.d.ts.map +1 -0
- package/dist/generate/kinds/read-model/live-rows-check.js +47 -0
- package/dist/generate/kinds/read-model/live-rows-check.js.map +1 -0
- package/dist/generate/kinds/read-model/read-model-fields.d.ts +19 -0
- package/dist/generate/kinds/read-model/read-model-fields.d.ts.map +1 -0
- package/dist/generate/kinds/read-model/read-model-fields.js +31 -0
- package/dist/generate/kinds/read-model/read-model-fields.js.map +1 -0
- package/dist/generate/kinds/read-model/read-model-store.d.ts +24 -0
- package/dist/generate/kinds/read-model/read-model-store.d.ts.map +1 -0
- package/dist/generate/kinds/read-model/read-model-store.js +39 -0
- package/dist/generate/kinds/read-model/read-model-store.js.map +1 -0
- package/dist/generate/kinds/read-model/read-model-table.d.ts +11 -0
- package/dist/generate/kinds/read-model/read-model-table.d.ts.map +1 -0
- package/dist/generate/kinds/read-model/read-model-table.js +2 -0
- package/dist/generate/kinds/read-model/read-model-table.js.map +1 -0
- package/dist/generate/kinds/read-model-kind.d.ts +3 -0
- package/dist/generate/kinds/read-model-kind.d.ts.map +1 -0
- package/dist/generate/kinds/read-model-kind.js +84 -0
- package/dist/generate/kinds/read-model-kind.js.map +1 -0
- package/dist/generate/kinds.d.ts.map +1 -1
- package/dist/generate/kinds.js +4 -0
- package/dist/generate/kinds.js.map +1 -1
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +8 -0
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/help/tool-notes.d.ts.map +1 -1
- package/dist/help/tool-notes.js +2 -1
- package/dist/help/tool-notes.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +2 -0
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/manifest/dependencies-for.d.ts.map +1 -1
- package/dist/init/manifest/dependencies-for.js +10 -7
- package/dist/init/manifest/dependencies-for.js.map +1 -1
- package/dist/init/manifest/versions.js +25 -25
- package/dist/layout/fit-block.js +4 -0
- package/dist/layout/fit-block.js.map +1 -1
- package/dist/presets/no-flags.d.ts.map +1 -1
- package/dist/presets/no-flags.js +1 -0
- package/dist/presets/no-flags.js.map +1 -1
- package/dist/stack/end-to-end-vars.d.ts +9 -0
- package/dist/stack/end-to-end-vars.d.ts.map +1 -0
- package/dist/stack/end-to-end-vars.js +32 -0
- package/dist/stack/end-to-end-vars.js.map +1 -0
- package/dist/stack/stack-vars.d.ts.map +1 -1
- package/dist/stack/stack-vars.js +2 -0
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/briefing-of.js +2 -2
- package/dist/worker/briefing-of.js.map +1 -1
- package/package.json +6 -6
- package/templates/e2e/e2e-background-job-case.ts.tpl +12 -0
- package/templates/e2e/e2e-job.spec.ts.tpl +3 -3
- package/templates/init/README.md.tpl +1 -1
- package/templates/init/e2e/jest.e2e.config.js.tpl +24 -5
- package/templates/init/e2e/start-application.database.ts.tpl +40 -2
- package/templates/init/e2e/start-application.memory.ts.tpl +36 -0
- package/templates/init/e2e/vitest.e2e.config.ts.tpl +12 -3
- package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +22 -4
- package/templates/init/platform/database/open-test-database.knex.ts.tpl +21 -3
- package/templates/init/platform/database/open-test-database.prisma.ts.tpl +22 -3
- package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +22 -3
- package/templates/init/platform/database/test-database-clone.ts.tpl +184 -0
- package/templates/init/platform/jobs/background-jobs.ts.tpl +4 -0
- package/templates/init/platform/jobs/create-background-work.ts.tpl +1 -0
- package/templates/init/rules/infrastructure.md.tpl +1 -1
- package/templates/personal-data/declaration.drizzle.ts.tpl +6 -1
- package/templates/personal-data/declaration.knex.ts.tpl +14 -1
- package/templates/personal-data/declaration.prisma.ts.tpl +6 -1
- package/templates/personal-data/declaration.typeorm.ts.tpl +21 -1
- package/templates/personal-data/spec.table.ts.tpl +39 -0
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/projection/projection.manual.ts.tpl +2 -2
- package/templates/projection/projection.ts.tpl +2 -2
- package/templates/read-model/contract.spec.ts.tpl +95 -0
- package/templates/read-model/drizzle/schema.ts.tpl +8 -0
- package/templates/read-model/drizzle/store.ts.tpl +41 -0
- package/templates/read-model/drizzle/table.tpl +38 -0
- package/templates/read-model/fake.ts.tpl +8 -0
- package/templates/read-model/knex/store.ts.tpl +41 -0
- package/templates/read-model/knex/table.tpl +26 -0
- package/templates/read-model/none/store.ts.tpl +17 -0
- package/templates/read-model/port.ts.tpl +24 -0
- package/templates/read-model/prisma/model.tpl +25 -0
- package/templates/read-model/prisma/store.ts.tpl +43 -0
- package/templates/read-model/typeorm/schema-export.tpl +4 -0
- package/templates/read-model/typeorm/schema.ts.tpl +9 -0
- package/templates/read-model/typeorm/store.ts.tpl +30 -0
- package/templates/read-model/typeorm/table.tpl +54 -0
- package/templates/read-model/wiring.container.tpl +21 -0
- package/templates/repository/drizzle/table.tpl +1 -0
- package/templates/repository/typeorm/table.tpl +1 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { readControllers } from '../../describe/read-controllers.js';
|
|
2
|
+
import { CliError } from '../../cli-error.js';
|
|
2
3
|
import { fitStatement } from '../../layout/index.js';
|
|
3
4
|
import { toName } from '../../naming/index.js';
|
|
4
5
|
import { renderTemplate } from '../../templating/index.js';
|
|
@@ -7,6 +8,7 @@ import { named } from '../named.js';
|
|
|
7
8
|
import { openScope } from '../open-scope.js';
|
|
8
9
|
import { vars } from '../vars.js';
|
|
9
10
|
import { actingRole } from './e2e/acting-role.js';
|
|
11
|
+
import { jobSpec } from './e2e/job-spec.js';
|
|
10
12
|
import { reactionOf } from './e2e/reaction-of.js';
|
|
11
13
|
import { tracedCommand } from './traced-command.js';
|
|
12
14
|
import { isControlPlane } from '../../config/is-control-plane.js';
|
|
@@ -14,8 +16,8 @@ import { declaredModules } from '../../model-modules/index.js';
|
|
|
14
16
|
export const e2eKind = {
|
|
15
17
|
name: 'e2e',
|
|
16
18
|
aliases: [],
|
|
17
|
-
usage: 'e2e <context> <UseCaseName> [--event <eventType>]',
|
|
18
|
-
summary: 'An end-to-end spec on the whole application, in test/e2e/ at the project root: driving the route of a use case, or, for a use case no route reaches, publishing the integration event its handler receives (--event names it when several do) or running the job that sends its command. After `generate route <context> <UseCaseName>`, or the `generate integration-handler` or `generate job` that starts its use case.',
|
|
19
|
+
usage: 'e2e <context> <UseCaseName> [--event <eventType> | --job <JobName>]',
|
|
20
|
+
summary: 'An end-to-end spec on the whole application, in test/e2e/ at the project root: driving the route of a use case, or, for a use case no route reaches, publishing the integration event its handler receives (--event names it when several do) or running the job that sends its command, the scheduled one at once and the background one with what is due on its queue (--job names one job, also for a use case a route reaches, and writes test/e2e/<use-case>-<job>.e2e.spec.ts). After `generate route <context> <UseCaseName>`, or the `generate integration-handler`, `generate job` or `generate background-job` that starts its use case.',
|
|
19
21
|
positionals: ['context', 'UseCaseName'],
|
|
20
22
|
writesShared: false,
|
|
21
23
|
writesInModules: false,
|
|
@@ -23,35 +25,39 @@ export const e2eKind = {
|
|
|
23
25
|
const scope = openScope(request);
|
|
24
26
|
const name = label(scope, request.args[1] ?? '', { what: 'use case', strip: ['route', 'controller', 'handler'] });
|
|
25
27
|
const file = `${scope.dir}/presentation/http/${name.kebab}.route.ts`;
|
|
26
|
-
const endpoint = scope
|
|
27
|
-
|
|
28
|
-
let starts = 'route';
|
|
29
|
-
if (endpoint === undefined) {
|
|
30
|
-
const reaction = reactionOf(scope, name, file);
|
|
31
|
-
starts = 'jobs' in reaction ? 'job' : 'event';
|
|
32
|
-
scope.ws.create(spec, reactionSpec(scope, name, reaction));
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
const traced = tracedCommand(scope, name);
|
|
36
|
-
const command = `{ name: 'command ${name.pascal}Command'${traced.saved} }`;
|
|
37
|
-
const tree = spanTree(`${endpoint.method} ${endpoint.path}`, command);
|
|
38
|
-
const { written: role, roleImport } = actingRole(scope);
|
|
39
|
-
const namesRole = endpoint.protected === true && roleImport !== '';
|
|
40
|
-
const actor = { role, roleImport, namesRole, tenant: tenantOf(scope) };
|
|
41
|
-
scope.ws.create(spec, renderTemplate('e2e/e2e.spec.ts.tpl', vars(scope, { name: named(name), e2e: { ...endpoint, ...traced, tree, ...actor } })));
|
|
42
|
-
}
|
|
43
|
-
noteSupport(scope, starts);
|
|
28
|
+
const endpoint = namesItsStarter(scope) ? undefined : endpointOf(scope, name, file);
|
|
29
|
+
noteSupport(scope, endpoint === undefined ? startedSpec(scope, name, file) : routeSpec(scope, name, endpoint));
|
|
44
30
|
},
|
|
45
31
|
};
|
|
46
|
-
/** The spec of a use case no route reaches: it publishes the event its handler receives, or runs the
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
32
|
+
/** The spec of a use case no route reaches, or whose starter a flag names: it publishes the event its handler receives, or runs the jobs that send its command. Answers what it needs of the support. */
|
|
33
|
+
function startedSpec(scope, name, routeFile) {
|
|
34
|
+
const reaction = reactionOf(scope, name, routeFile);
|
|
35
|
+
if ('jobs' in reaction) {
|
|
36
|
+
const { file, content, needs } = jobSpec(scope, name, reaction);
|
|
37
|
+
scope.ws.create(file, content);
|
|
38
|
+
return needs;
|
|
39
|
+
}
|
|
40
|
+
scope.ws.create(`test/e2e/${name.kebab}.e2e.spec.ts`, renderTemplate('e2e/e2e-reaction.spec.ts.tpl', vars(scope, { name: named(name), ...reaction })));
|
|
41
|
+
return ['publish'];
|
|
42
|
+
}
|
|
43
|
+
/** The spec that drives the route of the use case: the support of any project serves it. */
|
|
44
|
+
function routeSpec(scope, name, endpoint) {
|
|
45
|
+
const traced = tracedCommand(scope, name);
|
|
46
|
+
const command = `{ name: 'command ${name.pascal}Command'${traced.saved} }`;
|
|
47
|
+
const tree = spanTree(`${endpoint.method} ${endpoint.path}`, command);
|
|
48
|
+
const { written: role, roleImport } = actingRole(scope);
|
|
49
|
+
const namesRole = endpoint.protected === true && roleImport !== '';
|
|
50
|
+
const actor = { role, roleImport, namesRole, tenant: tenantOf(scope) };
|
|
51
|
+
scope.ws.create(`test/e2e/${name.kebab}.e2e.spec.ts`, renderTemplate('e2e/e2e.spec.ts.tpl', vars(scope, { name: named(name), e2e: { ...endpoint, ...traced, tree, ...actor } })));
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
/** True when a flag says what starts the use case: its route is then left aside. `--event` and `--job` name two different specs. */
|
|
55
|
+
function namesItsStarter(scope) {
|
|
56
|
+
const { event, job } = scope.flags;
|
|
57
|
+
if (event !== undefined && job !== undefined) {
|
|
58
|
+
throw new CliError('generate e2e takes --event or --job, not both.', 'A spec starts its use case one way: run the command once with --event <eventType>, once with --job <JobName>.');
|
|
50
59
|
}
|
|
51
|
-
|
|
52
|
-
.map((job) => renderTemplate('e2e/e2e-job-case.ts.tpl', vars(scope, { name: named(name), job: { name: job } })).trimEnd())
|
|
53
|
-
.join('\n\n');
|
|
54
|
-
return renderTemplate('e2e/e2e-job.spec.ts.tpl', vars(scope, { name: named(name), e2e: { ...reaction.e2e, cases } }));
|
|
60
|
+
return event !== undefined || job !== undefined;
|
|
55
61
|
}
|
|
56
62
|
/** The tenant the actors of the spec act in: a tenant-scoped repository refuses a token without one. */
|
|
57
63
|
function tenantOf(scope) {
|
|
@@ -60,17 +66,23 @@ function tenantOf(scope) {
|
|
|
60
66
|
: ", tenantId: 'acme'";
|
|
61
67
|
}
|
|
62
68
|
const SUPPORT = 'test/e2e/support/start-application.ts';
|
|
63
|
-
/**
|
|
64
|
-
|
|
69
|
+
/** How a project whose support was written before a function existed adds it by hand. */
|
|
70
|
+
const ADDED_BY_HAND = {
|
|
71
|
+
runJob: `${SUPPORT} has no runJob(name): add \`runJob(name: string): Promise<void>;\` to RunningApplication and implement it with \`async (name) => { await application.jobs.runNow(name); }\` on the composed application (\`jobs\` is its JobScheduler: \`platform.jobs\` by hand, \`container.resolve(JobScheduler)\` on tsyringe), as a new project has it.`,
|
|
72
|
+
runDueJobs: `${SUPPORT} has no runDueJobs(): add \`runDueJobs(): Promise<string[]>;\` to RunningApplication and implement it on the queue worker of the composed application (\`application.container.resolve(QueueWorker)\` on a container; by hand, \`application.platform.backgroundJobs\` once \`runDue: () => worker.runDue()\` is among what \`jobs/create-background-work.ts\` answers): \`await worker.stop()\`, then \`await worker.runDue()\`, rejecting when the outcome of a run is not \`succeeded\` and answering the name of each job run, as a new project has it.`,
|
|
73
|
+
publish: `${SUPPORT} has no publish(events): add \`publish(events: readonly IntegrationEvent[]): Promise<void>;\` to RunningApplication and implement it with \`(events) => application.eventBus.publish(events)\` on the composed application, as a new project has it.`,
|
|
74
|
+
};
|
|
75
|
+
/** What the spec needs of the support of the project: `init` writes it, older projects add what they lack by hand. */
|
|
76
|
+
function noteSupport(scope, needs) {
|
|
65
77
|
const support = scope.ws.read(SUPPORT);
|
|
66
78
|
if (support === undefined) {
|
|
67
79
|
scope.ws.note(`${SUPPORT} is missing: \`ddd-ts-kit init\` creates it (existing files are kept).`);
|
|
80
|
+
return;
|
|
68
81
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
scope.ws.note(`${SUPPORT} has no publish(events): add \`publish(events: readonly IntegrationEvent[]): Promise<void>;\` to RunningApplication and implement it with \`(events) => application.eventBus.publish(events)\` on the composed application, as a new project has it.`);
|
|
82
|
+
for (const need of needs) {
|
|
83
|
+
if (!new RegExp(String.raw `^\s*${need}\(`, 'm').test(support)) {
|
|
84
|
+
scope.ws.note(ADDED_BY_HAND[need]);
|
|
85
|
+
}
|
|
74
86
|
}
|
|
75
87
|
}
|
|
76
88
|
/** The spans a request leaves, as the spec expects them, laid out for the six spaces the element is written after. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e-kind.js","sourceRoot":"","sources":["../../../src/generate/kinds/e2e-kind.ts"],"names":[],"mappings":"AAAA,OAA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AAE,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC;QAC/C,MAAM,EAAE,EAAE;KACX,CAAC;IAEF,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC;IAC7G,MAAM,CAAC,QAAQ,CAAC,GAAG,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAE1C,IAAI,KAAK,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAClD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAElC,OAAO;QACL,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,WAAW,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;KAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -3,4 +3,12 @@ import type { RenderContext } from '../../templating/index.js';
|
|
|
3
3
|
import type { Scope } from '../scope.js';
|
|
4
4
|
/** The port of the repository of an aggregate, the adapter of the ORM of the stack, the fake and the contract both pass. */
|
|
5
5
|
export declare function generateRepository(scope: Scope, aggregate: Name): RenderContext;
|
|
6
|
+
/**
|
|
7
|
+
* `--tenant-scoped`, or a project whose `stack.tenancy` is not `none` in a context that is not the
|
|
8
|
+
* control plane of the tenants (`contexts.<name>.tenancy`): the adapter confines every statement to
|
|
9
|
+
* the tenant of the work in progress through the helpers of its ORM package (`tenantTable`,
|
|
10
|
+
* `tenantCondition`, `tenantWhere`). Defence in depth: the permission is still decided in the
|
|
11
|
+
* application layer.
|
|
12
|
+
*/
|
|
13
|
+
export declare function tenantVars(scope: Scope): RenderContext;
|
|
6
14
|
//# sourceMappingURL=generate-repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-repository.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/generate-repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-repository.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/generate-repository.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAWtC,4HAA4H;AAC5H,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,GAAG,aAAa,CA8B/E;AAID;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAatD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isControlPlane } from '../../config/index.js';
|
|
2
2
|
import { emit } from '../emit.js';
|
|
3
3
|
import { named } from '../named.js';
|
|
4
|
-
import { WITH_DATABASE } from '../../stack/with-database.js';
|
|
5
4
|
import { vars } from '../vars.js';
|
|
6
5
|
import { wire } from '../wire.js';
|
|
7
6
|
import { generateEventSourcedRepository } from './generate-event-sourced-repository.js';
|
|
8
7
|
import { isEventSourced } from './is-event-sourced.js';
|
|
8
|
+
import { noteTheMigration } from './note-the-migration.js';
|
|
9
9
|
import { declareStorage } from './declare-storage.js';
|
|
10
10
|
import { personalVars } from './personal-data/personal-vars.js';
|
|
11
11
|
import { REPOSITORY_ADAPTERS } from './repository-adapter.js';
|
|
@@ -34,17 +34,6 @@ export function generateRepository(scope, aggregate) {
|
|
|
34
34
|
scope.ws.note(`Fake${aggregate.pascal}Repository (test/fakes) and ${adapter.prefix}${aggregate.pascal}Repository pass the same repositoryContract (test/integration): handlers are tested with the fake.`);
|
|
35
35
|
return context;
|
|
36
36
|
}
|
|
37
|
-
/** The specs pass on the in-process database, which builds from the schema: nothing else says that a deployed one lacks the table. */
|
|
38
|
-
function noteTheMigration(scope) {
|
|
39
|
-
const { orm } = scope.config.stack;
|
|
40
|
-
if (!WITH_DATABASE.includes(orm)) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const generate = orm === 'typeorm'
|
|
44
|
-
? 'npm run build && npm run db:generate migrations/<what-it-does>'
|
|
45
|
-
: 'npm run db:generate <what-it-does>';
|
|
46
|
-
scope.ws.note(`The table reaches no database until \`${generate}\` writes its migration and \`npm run db:migrate\` applies it: the specs pass before that, on the in-process database.`);
|
|
47
|
-
}
|
|
48
37
|
const TENANT_AWARE = ['drizzle', 'knex', 'prisma', 'typeorm'];
|
|
49
38
|
/**
|
|
50
39
|
* `--tenant-scoped`, or a project whose `stack.tenancy` is not `none` in a context that is not the
|
|
@@ -53,7 +42,7 @@ const TENANT_AWARE = ['drizzle', 'knex', 'prisma', 'typeorm'];
|
|
|
53
42
|
* `tenantCondition`, `tenantWhere`). Defence in depth: the permission is still decided in the
|
|
54
43
|
* application layer.
|
|
55
44
|
*/
|
|
56
|
-
function tenantVars(scope) {
|
|
45
|
+
export function tenantVars(scope) {
|
|
57
46
|
const { config } = scope;
|
|
58
47
|
const inherited = config.stack.tenancy !== 'none' && !isControlPlane(config, scope.context.kebab);
|
|
59
48
|
const asked = scope.flags.tenantScoped || inherited;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-repository.js","sourceRoot":"","sources":["../../../src/generate/kinds/generate-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,cAAc,CAAC;AAG7D,OAAO,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AC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEhE,IAAI,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;QACrB,KAAK,CAAC,EAAE,CAAC,IAAI,CACX,iFAAiF,MAAM,CAAC,KAAK,CAAC,GAAG,mKAAmK,CACrQ,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Scope } from '../scope.js';
|
|
2
|
+
/** The specs pass on the in-process database, which builds from the schema: nothing else says that a deployed one lacks the table. */
|
|
3
|
+
export declare function noteTheMigration(scope: Scope): void;
|
|
4
|
+
//# sourceMappingURL=note-the-migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-the-migration.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/note-the-migration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,sIAAsI;AACtI,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAenD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WITH_DATABASE } from '../../stack/with-database.js';
|
|
2
|
+
/** The specs pass on the in-process database, which builds from the schema: nothing else says that a deployed one lacks the table. */
|
|
3
|
+
export function noteTheMigration(scope) {
|
|
4
|
+
const { orm } = scope.config.stack;
|
|
5
|
+
if (!WITH_DATABASE.includes(orm)) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const generate = orm === 'typeorm'
|
|
9
|
+
? 'npm run build && npm run db:generate migrations/<what-it-does>'
|
|
10
|
+
: 'npm run db:generate <what-it-does>';
|
|
11
|
+
scope.ws.note(`The table reaches no database until \`${generate}\` writes its migration and \`npm run db:migrate\` applies it: the specs pass before that, on the in-process database.`);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=note-the-migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-the-migration.js","sourceRoot":"","sources":["../../../src/generate/kinds/note-the-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,sIAAsI;AACtI,MAAM,UAAU,gBAAgB,CAAC,KAAY;IAC3C,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;IAEnC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GACZ,GAAG,KAAK,SAAS;QACf,CAAC,CAAC,gEAAgE;QAClE,CAAC,CAAC,oCAAoC,CAAC;IAE3C,KAAK,CAAC,EAAE,CAAC,IAAI,CACX,yCAAyC,QAAQ,wHAAwH,CAC1K,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PersonalColumn } from './personal-column.js';
|
|
2
|
+
import type { PersonalRequest } from './personal-request-of.js';
|
|
3
|
+
import type { FoundTable } from './table-of-schema.js';
|
|
4
|
+
/** The columns a request names, as the table spells them, and the ones its definition did not let the generator read. */
|
|
5
|
+
export interface ColumnsOfTable {
|
|
6
|
+
readonly columnOf: (column: string) => PersonalColumn;
|
|
7
|
+
/** Named by the request and not found in a definition that takes columns from elsewhere: said in the output, to check by hand. */
|
|
8
|
+
readonly unread: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Every column `--personal`, `--subject` and `--retention` name, looked up in the definition of
|
|
12
|
+
* the table: the generator adds no column to a table of the project. One the definition does not
|
|
13
|
+
* hold is refused; when the definition takes columns from elsewhere (a spread, a helper), what
|
|
14
|
+
* it does not name may still be there, and is answered as unread. A table whose erasure is
|
|
15
|
+
* confined to the tenant of the work holds `tenant_id` too.
|
|
16
|
+
*/
|
|
17
|
+
export declare function columnsOfTable(found: FoundTable, request: PersonalRequest, tenantScoped: boolean): ColumnsOfTable;
|
|
18
|
+
//# sourceMappingURL=columns-of-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns-of-table.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/columns-of-table.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,yHAAyH;AACzH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,cAAc,CAAC;IACtD,kIAAkI;IAClI,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAID;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,GAAG,cAAc,CAejH"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CliError } from '../../../cli-error.js';
|
|
2
|
+
import { personalColumn } from './personal-column.js';
|
|
3
|
+
const TENANT_COLUMN = 'tenant_id';
|
|
4
|
+
/**
|
|
5
|
+
* Every column `--personal`, `--subject` and `--retention` name, looked up in the definition of
|
|
6
|
+
* the table: the generator adds no column to a table of the project. One the definition does not
|
|
7
|
+
* hold is refused; when the definition takes columns from elsewhere (a spread, a helper), what
|
|
8
|
+
* it does not name may still be there, and is answered as unread. A table whose erasure is
|
|
9
|
+
* confined to the tenant of the work holds `tenant_id` too.
|
|
10
|
+
*/
|
|
11
|
+
export function columnsOfTable(found, request, tenantScoped) {
|
|
12
|
+
const { table } = found;
|
|
13
|
+
const held = (column) => table.columns.find((one) => one.column === column);
|
|
14
|
+
const dated = request.retention === undefined ? [] : [request.retention.column];
|
|
15
|
+
const missing = [...request.fields, request.subject, ...dated].filter((column) => held(column) === undefined);
|
|
16
|
+
if (missing.length > 0 && !table.open) {
|
|
17
|
+
throw absent(found, missing);
|
|
18
|
+
}
|
|
19
|
+
if (tenantScoped && !table.open && held(TENANT_COLUMN) === undefined) {
|
|
20
|
+
throw withoutTenant(found);
|
|
21
|
+
}
|
|
22
|
+
return { columnOf: (column) => held(column) ?? personalColumn(column), unread: missing };
|
|
23
|
+
}
|
|
24
|
+
function absent({ table, file }, missing) {
|
|
25
|
+
const columns = table.columns.map((one) => one.column);
|
|
26
|
+
return new CliError(`The table ${table.name} of ${file} holds no column ${missing.join(', ')}.`, `This generator declares the columns a table has, it adds none: name the columns as the database spells them (${[...new Set(columns)].join(', ')}), or add the column to the table in ${file} first, with its migration.`);
|
|
27
|
+
}
|
|
28
|
+
function withoutTenant({ table, file }) {
|
|
29
|
+
return new CliError(`The table ${table.name} of ${file} holds no column ${TENANT_COLUMN}, and the erasure of this context confines every statement to the tenant of the work.`, `Add the tenant column to the table in ${file} (tenantColumn of the ORM package of the kit), with its migration, then run the command again: a table without it cannot be erased tenant by tenant.`);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=columns-of-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns-of-table.js","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/columns-of-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AAWxE,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,KAAiB,EAAE,OAAwB,EAAE,YAAqB;IAC/F,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,IAAI,GAAG,CAAC,MAAc,EAA8B,EAAE,CAAC,KAAK,CAAC,OAAO,CAA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AG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,wCAAwC,IAAI,6BAA6B,CAC1N,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAc;IAChD,OAAO,IAAI,QAAQ,CACjB,aAAa,KAAK,CAAC,IAAI,OAAO,IAAI,oBAAoB,aAAa,uFAAuF,EAC1J,yCAAyC,IAAI,sJAAsJ,CACpM,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declare-personal-data.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/declare-personal-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"declare-personal-data.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/declare-personal-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAe/F"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { applyWiring } from '../../apply-wiring.js';
|
|
2
|
-
import { emit } from '../../emit.js';
|
|
3
|
-
import { rendered } from '../../rendered.js';
|
|
4
|
-
import { wire } from '../../wire.js';
|
|
5
|
-
import { wiringFamily } from '../../wiring-family.js';
|
|
6
1
|
import { personalNames } from './personal-names.js';
|
|
7
2
|
import { personalRequestOf } from './personal-request-of.js';
|
|
3
|
+
import { writePersonalDeclaration } from './write-personal-declaration.js';
|
|
8
4
|
/**
|
|
9
5
|
* `--personal`: the declaration of the personal columns of the table, next to its mapper, and the
|
|
10
6
|
* erasure and the export of the context that read every such declaration: their ports, their
|
|
@@ -18,53 +14,12 @@ export function declarePersonalData(scope, aggregate, context) {
|
|
|
18
14
|
return;
|
|
19
15
|
}
|
|
20
16
|
const names = personalNames(scope.config.stack.orm, scope.context);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
]);
|
|
28
|
-
if (adapters.some((file) => scope.ws.exists(file))) {
|
|
29
|
-
for (const file of adapters) {
|
|
30
|
-
applyWiring(scope.ws, file, rendered(scope, 'personal-data/adapter-field.tpl', context));
|
|
31
|
-
}
|
|
32
|
-
scope.ws.note(`${aggregate.pascal}PersonalFields joined the declarations of ${names.adapter} and ${names.exportAdapter}: their spec covers the first table of the context, add this one to it.`);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
writeErasure(scope, context, names);
|
|
36
|
-
writeExport(scope, context, names);
|
|
37
|
-
wire(scope, 'personal-data', context);
|
|
38
|
-
scope.ws.note(written(scope, { aggregate, request, names }));
|
|
39
|
-
}
|
|
40
|
-
function adapterFileOf(scope) {
|
|
41
|
-
return (adapter) => `${scope.dir}/infrastructure/persistence/${adapter}.repository.ts`;
|
|
42
|
-
}
|
|
43
|
-
/** The port, the adapter, the fake and the spec of the erasure of the context, listed among the copies the platform erases. */
|
|
44
|
-
function writeErasure(scope, context, names) {
|
|
45
|
-
const { orm } = scope.config.stack;
|
|
46
|
-
emit(scope, context, [
|
|
47
|
-
['personal-data/port.ts.tpl', `application/ports/${names.portKebab}.port.ts`],
|
|
48
|
-
[`personal-data/erasure.${orm}.ts.tpl`, `infrastructure/persistence/${names.adapterKebab}.repository.ts`],
|
|
49
|
-
['personal-data/fake.ts.tpl', `test/fakes/${names.portKebab}.fake.ts`],
|
|
50
|
-
['personal-data/spec.ts.tpl', `test/integration/${scope.context.kebab}-personal-data.spec.ts`],
|
|
51
|
-
]);
|
|
52
|
-
listIn(scope, context, 'copies');
|
|
53
|
-
}
|
|
54
|
-
/** The port, the adapter and the fake of the export of the context, listed among the exports the platform gathers; the spec of the erasure covers it. */
|
|
55
|
-
function writeExport(scope, context, names) {
|
|
56
|
-
const { orm } = scope.config.stack;
|
|
57
|
-
emit(scope, context, [
|
|
58
|
-
['personal-data/export-port.ts.tpl', `application/ports/${names.exportPortKebab}.port.ts`],
|
|
59
|
-
[`personal-data/export.${orm}.ts.tpl`, `infrastructure/persistence/${names.exportAdapterKebab}.repository.ts`],
|
|
60
|
-
['personal-data/export-fake.ts.tpl', `test/fakes/${names.exportPortKebab}.fake.ts`],
|
|
61
|
-
]);
|
|
62
|
-
listIn(scope, context, 'exports');
|
|
63
|
-
}
|
|
64
|
-
/** The port on tsyringe, or the factory of the hand-wired platform, listed once in the file of the platform the script reads. */
|
|
65
|
-
function listIn(scope, context, list) {
|
|
66
|
-
const family = wiringFamily(scope.config) === 'manual' ? 'manual' : 'container';
|
|
67
|
-
applyWiring(scope.ws, `${scope.config.platformDir}/privacy/data-subject-${list}.ts`, rendered(scope, `personal-data/${list}.${family}.tpl`, context));
|
|
17
|
+
writePersonalDeclaration(scope, context, {
|
|
18
|
+
owner: aggregate,
|
|
19
|
+
spec: 'personal-data/spec.ts.tpl',
|
|
20
|
+
joined: `${aggregate.pascal}PersonalFields joined the declarations of ${names.adapter} and ${names.exportAdapter}: their spec covers the first table of the context, add this one to it.`,
|
|
21
|
+
written: written(scope, { aggregate, request, names }),
|
|
22
|
+
});
|
|
68
23
|
}
|
|
69
24
|
function written(scope, { aggregate, request, names }) {
|
|
70
25
|
const mode = request.erasure === 'row' ? 'the row deleted' : 'each read as [erased]';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declare-personal-data.js","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/declare-personal-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"declare-personal-data.js","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/declare-personal-data.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAwB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAY,EAAE,SAAe,EAAE,OAAsB;IACvF,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAEzC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAEnE,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE;QACvC,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,2BAA2B;QACjC,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,6CAA6C,KAAK,CAAC,OAAO,QAAQ,KAAK,CAAC,aAAa,yEAAyE;QACzL,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;KACvD,CAAC,CAAC;AACL,CAAC;AASD,SAAS,OAAO,CAAC,KAAY,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAW;IACnE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAErF,OAAO,GAAG,KAAK,CAAC,IAAI,eAAe,KAAK,CAAC,UAAU,oBAAoB,KAAK,CAAC,OAAO,CAAC,KAAK,uBAAuB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,KAAK,KAAK,IAAI,mBAAmB,OAAO,CAAC,OAAO,oJAAoJ,SAAS,CAAC,MAAM,oCAAoC,CAAC;AACtZ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Scope } from '../../scope.js';
|
|
2
|
+
/**
|
|
3
|
+
* `generate personal-fields <context> <table>`: the declaration of the personal columns of a
|
|
4
|
+
* table no aggregate owns (a read model, a table of received messages, a table written by hand),
|
|
5
|
+
* joined to the erasure and to the export of the context, or written with them when it is the
|
|
6
|
+
* first. The table is the project's own: it is read in the schema of the context, never changed,
|
|
7
|
+
* and no repository nor builder writes its rows, so the spec of a first declaration names each
|
|
8
|
+
* case to prove as `it.todo`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function declareTablePersonalFields(scope: Scope, name: string): void;
|
|
11
|
+
//# sourceMappingURL=declare-table-personal-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declare-table-personal-fields.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/declare-table-personal-fields.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAYzC;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CA6B3E"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { CliError } from '../../../cli-error.js';
|
|
2
|
+
import { readPersonalData } from '../../../docs/read-personal-data.js';
|
|
3
|
+
import { treeOf } from '../../../model-modules/index.js';
|
|
4
|
+
import { toName } from '../../../naming/index.js';
|
|
5
|
+
import { named } from '../../named.js';
|
|
6
|
+
import { vars } from '../../vars.js';
|
|
7
|
+
import { tenantVars } from '../generate-repository.js';
|
|
8
|
+
import { repositoryPrefix } from '../repository-prefix.js';
|
|
9
|
+
import { columnsOfTable } from './columns-of-table.js';
|
|
10
|
+
import { personalNames } from './personal-names.js';
|
|
11
|
+
import { personalRequestOfTable } from './personal-request-of-table.js';
|
|
12
|
+
import { personalVarsOf } from './personal-vars.js';
|
|
13
|
+
import { tableOfSchema } from './table-of-schema.js';
|
|
14
|
+
import { writePersonalDeclaration } from './write-personal-declaration.js';
|
|
15
|
+
/**
|
|
16
|
+
* `generate personal-fields <context> <table>`: the declaration of the personal columns of a
|
|
17
|
+
* table no aggregate owns (a read model, a table of received messages, a table written by hand),
|
|
18
|
+
* joined to the erasure and to the export of the context, or written with them when it is the
|
|
19
|
+
* first. The table is the project's own: it is read in the schema of the context, never changed,
|
|
20
|
+
* and no repository nor builder writes its rows, so the spec of a first declaration names each
|
|
21
|
+
* case to prove as `it.todo`.
|
|
22
|
+
*/
|
|
23
|
+
export function declareTablePersonalFields(scope, name) {
|
|
24
|
+
const request = personalRequestOfTable(scope);
|
|
25
|
+
const found = tableOfSchema(scope, name);
|
|
26
|
+
const owner = ownerOf(found);
|
|
27
|
+
refuseSecondDeclaration(scope, owner);
|
|
28
|
+
const tenant = tenantVars(scope);
|
|
29
|
+
const { columnOf, unread } = columnsOfTable(found, request, tenant.scoped === true);
|
|
30
|
+
const context = vars(scope, {
|
|
31
|
+
aggregate: named(owner),
|
|
32
|
+
adapter: repositoryPrefix(scope.config.stack.orm),
|
|
33
|
+
tenant,
|
|
34
|
+
personal: { ...personalVarsOf(scope, request, columnOf), ofTable: true },
|
|
35
|
+
});
|
|
36
|
+
writePersonalDeclaration(scope, context, {
|
|
37
|
+
owner,
|
|
38
|
+
spec: 'personal-data/spec.table.ts.tpl',
|
|
39
|
+
joined: joined(scope, owner),
|
|
40
|
+
written: written(scope, owner, request),
|
|
41
|
+
});
|
|
42
|
+
if (unread.length > 0) {
|
|
43
|
+
scope.ws.note(`The definition of ${owner.table} in ${found.file} takes columns from elsewhere (a spread, a helper), and ${unread.join(', ')} could not be read in it: check that the table holds ${unread.length === 1 ? 'it' : 'them'}. This generator adds no column to a table.`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** The table as the templates name what a declaration is about: its file and its constant after the table, its definition as the schema exports it. */
|
|
47
|
+
function ownerOf({ table }) {
|
|
48
|
+
return { ...toName(table.name), table: table.name, tableCamel: table.reference };
|
|
49
|
+
}
|
|
50
|
+
/** One declaration per table: the file this command would write, or a declaration of the context that names the table already. */
|
|
51
|
+
function refuseSecondDeclaration(scope, owner) {
|
|
52
|
+
const target = `${scope.dir}/infrastructure/persistence/${owner.kebab}.personal-fields.ts`;
|
|
53
|
+
const declared = readPersonalData(scope.ws, treeOf(scope.config, scope.context.kebab));
|
|
54
|
+
const file = declared.find((declaration) => declaration.table === owner.table)?.file;
|
|
55
|
+
if (file === undefined && !scope.ws.exists(target)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
throw new CliError(`${file ?? scope.ws.placed(target)} already declares what the table ${owner.table} keeps of a person.`, 'A table has one declaration: add the column to its `fields` there (a key of a file to its `files`), by hand.');
|
|
59
|
+
}
|
|
60
|
+
function joined(scope, owner) {
|
|
61
|
+
const names = personalNames(scope.config.stack.orm, scope.context);
|
|
62
|
+
return `${owner.pascal}PersonalFields joined the declarations of ${names.adapter} and ${names.exportAdapter}: their spec (test/integration/${scope.context.kebab}-personal-data.spec.ts) covers the tables declared before, add this one to it.`;
|
|
63
|
+
}
|
|
64
|
+
function written(scope, owner, request) {
|
|
65
|
+
const names = personalNames(scope.config.stack.orm, scope.context);
|
|
66
|
+
const context = scope.context.kebab;
|
|
67
|
+
const mode = request.erasure === 'row' ? 'the row deleted' : 'each read as [erased]';
|
|
68
|
+
const purged = request.retention === undefined ? '' : ', purged once its retention ended';
|
|
69
|
+
return `${names.port} erases and ${names.exportPort} hands over what ${context} keeps of a person: ${request.fields.join(', ')} of ${owner.table}, ${mode} for the person ${request.subject} names. \`npm run privacy:erase -- <subject-id>\` and \`npm run privacy:export -- <subject-id>\` run them with the other contexts. No aggregate owns ${owner.table}, so no repository nor builder writes its rows for a test: test/integration/${context}-personal-data.spec.ts names as it.todo each case to prove on the test database (erased for the subject and left to the others, exported${purged}), with rows inserted as the project writes that table.`;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=declare-table-personal-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declare-table-personal-fields.js","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/declare-table-personal-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAa,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAmB,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAY,EAAE,IAAY;IACnE,MAAM,OAAO,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,OA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AAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IACpC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,uBAAuB,CAAC;IACrF,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mCAAmC,CAAC;IAE1F,OAAO,GAAG,KAAK,CAAC,IAAI,eAAe,KAAK,CAAC,UAAU,oBAAoB,OAAO,uBAAuB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,KAAK,KAAK,IAAI,mBAAmB,OAAO,CAAC,OAAO,wJAAwJ,KAAK,CAAC,KAAK,+EAA+E,OAAO,2IAA2I,MAAM,yDAAyD,CAAC;AACjoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Scope } from '../../scope.js';
|
|
2
|
+
import { type PersonalRequest } from './personal-request-of.js';
|
|
3
|
+
/**
|
|
4
|
+
* The request of `generate personal-fields`, on a table no aggregate owns: `--personal` and
|
|
5
|
+
* `--subject` are both required, then checked as `--personal` of a repository is. No default
|
|
6
|
+
* names the subject there: the row of such a table (a read model, a received message) is rarely
|
|
7
|
+
* the person, and a declaration that said `id` would have the erasure look for the person in the
|
|
8
|
+
* wrong column while the register says the table is covered.
|
|
9
|
+
*/
|
|
10
|
+
export declare function personalRequestOfTable(scope: Scope): PersonalRequest;
|
|
11
|
+
//# sourceMappingURL=personal-request-of-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personal-request-of-table.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/personal-request-of-table.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe,CAiBpE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CliError } from '../../../cli-error.js';
|
|
2
|
+
import { personalRequestOf } from './personal-request-of.js';
|
|
3
|
+
/**
|
|
4
|
+
* The request of `generate personal-fields`, on a table no aggregate owns: `--personal` and
|
|
5
|
+
* `--subject` are both required, then checked as `--personal` of a repository is. No default
|
|
6
|
+
* names the subject there: the row of such a table (a read model, a received message) is rarely
|
|
7
|
+
* the person, and a declaration that said `id` would have the erasure look for the person in the
|
|
8
|
+
* wrong column while the register says the table is covered.
|
|
9
|
+
*/
|
|
10
|
+
export function personalRequestOfTable(scope) {
|
|
11
|
+
const { personal, subject } = scope.flags;
|
|
12
|
+
const request = personal === undefined || subject === undefined ? undefined : personalRequestOf(scope);
|
|
13
|
+
if (request !== undefined) {
|
|
14
|
+
return request;
|
|
15
|
+
}
|
|
16
|
+
throw personal === undefined
|
|
17
|
+
? new CliError('generate personal-fields needs --personal: the columns of the table that hold personal data.', 'Name them as the database spells them, comma separated: --personal email,display_name --subject <column>.')
|
|
18
|
+
: new CliError('generate personal-fields needs --subject: the column that holds the id of the person a row is about.', 'Name it: --subject customer_id. No default here: on a table without aggregate the row is rarely the person, and a declaration that named `id` by default would have `npm run privacy:erase -- <person>` miss the row while the register says the column is covered. Give `--subject id` only when the id of the row is the id of the person.');
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=personal-request-of-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personal-request-of-table.js","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/personal-request-of-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAwB,MAAM,uBAAuB,CAAC;AAEhF;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAY;IACjD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1C,MAAM,OAAO,GAAG,QAAQ,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAEvG,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,QAAQ,KAAK,SAAS;QAC1B,CAAC,CAAC,IAAI,QAAQ,CACV,8FAA8F,EAC9F,2GAA2G,CAC5G;QACH,CAAC,CAAC,IAAI,QAAQ,CACV,sGAAsG,EACtG,8UAA8U,CAC/U,CAAC;AACR,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { RenderContext } from '../../../templating/index.js';
|
|
2
2
|
import type { Scope } from '../../scope.js';
|
|
3
|
+
import { type PersonalColumn } from './personal-column.js';
|
|
4
|
+
import { type PersonalRequest } from './personal-request-of.js';
|
|
5
|
+
/** How a column the request names is spelled in the definition of its table: derived from its SQL name, or read in the schema of a table the project wrote. */
|
|
6
|
+
type ColumnOf = (column: string) => PersonalColumn;
|
|
3
7
|
/**
|
|
4
8
|
* `--personal` as the templates read it: whether a declaration is written, how the rows are erased,
|
|
5
9
|
* the columns the storage gains, and for each ORM the names its declaration, its rows and its tests
|
|
6
10
|
* spell. Nothing when the flag is absent.
|
|
7
11
|
*/
|
|
8
12
|
export declare function personalVars(scope: Scope): RenderContext;
|
|
13
|
+
/** The request of a declaration as the templates read it, each column spelled by `columnOf`. */
|
|
14
|
+
export declare function personalVarsOf(scope: Scope, request: PersonalRequest, columnOf: ColumnOf): RenderContext;
|
|
15
|
+
export {};
|
|
9
16
|
//# sourceMappingURL=personal-vars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personal-vars.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/personal-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"personal-vars.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/personal-data/personal-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzC,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAoBhF,+JAA+J;AAC/J,KAAK,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,cAAc,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAMxD;AAED,gGAAgG;AAChG,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAG,aAAa,CAkBxG"}
|