ddd-ts-kit 0.110.0 → 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 +56 -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,61 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { CliError } from '../../cli-error.js';
|
|
4
|
-
import { TABLES_FILES } from './tables-files.js';
|
|
5
|
-
import { keepsSinglePrismaSchema, PRISMA_MAIN_SCHEMA, PRISMA_SCHEMA_FOLDER, prismaSchemaOf, schemaOfContext, singlePrismaSchemaFound, singlePrismaSchemaSteps, withDatasourceSchema, } from '../../prisma-schema/index.js';
|
|
1
|
+
import { declareTable } from './declare-table.js';
|
|
2
|
+
const AGGREGATE_TABLE = 'The generator declares a table once: change it by hand in <file>. Personal columns the table holds are then declared by `ddd-ts-kit generate personal-fields <context> <table> --personal <column>,... --subject <column>`, or, when the table has its *.personal-fields.ts already, by a line in its fields.';
|
|
6
3
|
/** The table or model of the aggregate, declared where the migration tooling of the ORM reads it. */
|
|
7
4
|
export function declareStorage(scope, aggregate, context) {
|
|
8
|
-
|
|
9
|
-
const tablesFile = TABLES_FILES[orm];
|
|
10
|
-
if (orm === 'prisma') {
|
|
11
|
-
declarePrismaModel(scope, aggregate, context);
|
|
12
|
-
}
|
|
13
|
-
if (tablesFile === undefined) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const directory = `${scope.dir}/infrastructure/persistence`;
|
|
17
|
-
const tables = `${directory}/${tablesFile(scope.context.kebab)}.ts`;
|
|
18
|
-
if (orm === 'knex') {
|
|
19
|
-
scope.ws.create(`${directory}/${scope.context.kebab}.schema.ts`, renderTemplate('repository/knex/schema.ts.tpl', context));
|
|
20
|
-
scope.ws.create(tables, renderTemplate('repository/knex/tables.ts.tpl', context));
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
scope.ws.create(tables, renderTemplate(`repository/${orm}/schema.ts.tpl`, context));
|
|
24
|
-
}
|
|
25
|
-
declareOnce(scope, { file: tables, table: aggregate.table }, renderTemplate(`repository/${orm}/table.tpl`, context));
|
|
26
|
-
applyWiring(scope.ws, `${scope.config.platformDir}/database/schema.ts`, renderTemplate(`repository/${orm}/schema-export.tpl`, context));
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* A command run again with the same options adds nothing, its block being there already. Run again with others
|
|
30
|
-
* (`--personal`, `--tenant-scoped`), it would declare the table a second time under the same name, and every
|
|
31
|
-
* spec that loads the file would fail on the name declared twice: it is refused, the file left as it was.
|
|
32
|
-
*/
|
|
33
|
-
function declareOnce(scope, { file, table }, wiring) {
|
|
34
|
-
const named = new RegExp(`['"]${table}['"]`, 'g');
|
|
35
|
-
const declared = () => scope.ws.read(file)?.match(named)?.length ?? 0;
|
|
36
|
-
const before = declared();
|
|
37
|
-
applyWiring(scope.ws, file, wiring);
|
|
38
|
-
if (before > 0 && declared() > before) {
|
|
39
|
-
throw new CliError(`${file} already declares the table ${table}, with other columns than this command would write.`, `Change the table by hand in ${file}, a personal field with its line in the *.personal-fields.ts of the aggregate; the generator declares a table once.`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Prisma reads the files of one folder: the model joins the file of its context, which the worker
|
|
44
|
-
* of the context owns, and the database schema of the context the datasource of the main file.
|
|
45
|
-
*/
|
|
46
|
-
function declarePrismaModel(scope, aggregate, context) {
|
|
47
|
-
const models = prismaSchemaOf(scope.context.kebab);
|
|
48
|
-
if (keepsSinglePrismaSchema((file) => scope.ws.exists(file))) {
|
|
49
|
-
throw new CliError(`${singlePrismaSchemaFound()} The model would go to ${models}, which Prisma reads only once prisma.config.ts names ${PRISMA_SCHEMA_FOLDER}.`, `${singlePrismaSchemaSteps(Object.keys(scope.config.contexts))} Then run this command again.`);
|
|
50
|
-
}
|
|
51
|
-
if (scope.ws.read(models) === undefined) {
|
|
52
|
-
scope.ws.create(models, renderTemplate('repository/prisma/schema.prisma.tpl', context));
|
|
53
|
-
}
|
|
54
|
-
declareOnce(scope, { file: models, table: aggregate.table }, renderTemplate('repository/prisma/model.tpl', context));
|
|
55
|
-
const content = scope.ws.read(PRISMA_MAIN_SCHEMA);
|
|
56
|
-
if (content !== undefined) {
|
|
57
|
-
scope.ws.update(PRISMA_MAIN_SCHEMA, withDatasourceSchema(content, schemaOfContext(scope.context.kebab)));
|
|
58
|
-
}
|
|
59
|
-
scope.ws.note(`${models} changed: run \`npm run db:client\` to regenerate the client and the schema of the tests.`);
|
|
5
|
+
declareTable(scope, context, { table: aggregate.table, templates: 'repository', changedBy: AGGREGATE_TABLE });
|
|
60
6
|
}
|
|
61
7
|
//# sourceMappingURL=declare-storage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declare-storage.js","sourceRoot":"","sources":["../../../src/generate/kinds/declare-storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"declare-storage.js","sourceRoot":"","sources":["../../../src/generate/kinds/declare-storage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,eAAe,GACnB,+SAA+S,CAAC;AAElT,qGAAqG;AACrG,MAAM,UAAU,cAAc,CAAC,KAAY,EAAE,SAAe,EAAE,OAAsB;IAClF,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;AAChH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RenderContext } from '../../templating/index.js';
|
|
2
|
+
import type { Scope } from '../scope.js';
|
|
3
|
+
/** A table a generator declares in the storage of a context. */
|
|
4
|
+
export interface DeclaredTable {
|
|
5
|
+
/** The name of the table in the database. */
|
|
6
|
+
readonly table: string;
|
|
7
|
+
/** The folder of the templates that write it, per ORM; a file it does not hold is the one of `repository`. */
|
|
8
|
+
readonly templates: string;
|
|
9
|
+
/** How to change a table already declared, since the generator declares it once; `<file>`, `<context>` and `<table>` are filled in. */
|
|
10
|
+
readonly changedBy: string;
|
|
11
|
+
}
|
|
12
|
+
/** A table or a model, declared where the migration tooling of the ORM reads it; nothing without an ORM of the kit. */
|
|
13
|
+
export declare function declareTable(scope: Scope, context: RenderContext, declared: DeclaredTable): void;
|
|
14
|
+
//# sourceMappingURL=declare-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declare-table.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/declare-table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AActC,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8GAA8G;IAC9G,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uIAAuI;IACvI,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,uHAAuH;AACvH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI,CAkChG"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { renderTemplate, templateExists } from '../../templating/index.js';
|
|
2
|
+
import { applyWiring } from '../apply-wiring.js';
|
|
3
|
+
import { CliError } from '../../cli-error.js';
|
|
4
|
+
import { TABLES_FILES } from './tables-files.js';
|
|
5
|
+
import { keepsSinglePrismaSchema, PRISMA_MAIN_SCHEMA, PRISMA_SCHEMA_FOLDER, prismaSchemaOf, schemaOfContext, singlePrismaSchemaFound, singlePrismaSchemaSteps, withDatasourceSchema, } from '../../prisma-schema/index.js';
|
|
6
|
+
/** A table or a model, declared where the migration tooling of the ORM reads it; nothing without an ORM of the kit. */
|
|
7
|
+
export function declareTable(scope, context, declared) {
|
|
8
|
+
const { orm } = scope.config.stack;
|
|
9
|
+
const tablesFile = TABLES_FILES[orm];
|
|
10
|
+
if (orm === 'prisma') {
|
|
11
|
+
declarePrismaModel(scope, context, declared);
|
|
12
|
+
}
|
|
13
|
+
if (tablesFile === undefined) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const template = (file) => templateOf(declared, `${orm}/${file}`);
|
|
17
|
+
const directory = `${scope.dir}/infrastructure/persistence`;
|
|
18
|
+
const tables = `${directory}/${tablesFile(scope.context.kebab)}.ts`;
|
|
19
|
+
if (orm === 'knex') {
|
|
20
|
+
scope.ws.create(`${directory}/${scope.context.kebab}.schema.ts`, renderTemplate(template('schema.ts.tpl'), context));
|
|
21
|
+
scope.ws.create(tables, renderTemplate(template('tables.ts.tpl'), context));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
scope.ws.create(tables, renderTemplate(template('schema.ts.tpl'), context));
|
|
25
|
+
}
|
|
26
|
+
declareOnce(scope, { file: tables, declared }, renderTemplate(template('table.tpl'), context));
|
|
27
|
+
applyWiring(scope.ws, `${scope.config.platformDir}/database/schema.ts`, renderTemplate(template('schema-export.tpl'), context));
|
|
28
|
+
}
|
|
29
|
+
/** The template of the kind that declares the table, or the one a repository starts the same file with. */
|
|
30
|
+
function templateOf({ templates }, file) {
|
|
31
|
+
const own = `${templates}/${file}`;
|
|
32
|
+
return templateExists(own) ? own : `repository/${file}`;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A command run again with the same options adds nothing, its block being there already. Run again with others
|
|
36
|
+
* (`--personal`, `--tenant-scoped`, `--field`), it would declare the table a second time under the same name, and
|
|
37
|
+
* every spec that loads the file would fail on the name declared twice: it is refused, the file left as it was.
|
|
38
|
+
* A table is counted where it is declared (`.table(`, `createTable(`, `tableName:`, `@@map(`): a column may bear
|
|
39
|
+
* the name of another table.
|
|
40
|
+
*/
|
|
41
|
+
function declareOnce(scope, { file, declared }, wiring) {
|
|
42
|
+
const named = new RegExp(`(?:\\btable\\(\\s*|\\bcreateTable\\(|\\btableName: |@@map\\()['"]${declared.table}['"]`, 'g');
|
|
43
|
+
const count = () => scope.ws.read(file)?.match(named)?.length ?? 0;
|
|
44
|
+
const before = count();
|
|
45
|
+
applyWiring(scope.ws, file, wiring);
|
|
46
|
+
if (before > 0 && count() > before) {
|
|
47
|
+
throw new CliError(`${file} already declares the table ${declared.table}, with other columns than this command would write.`, declared.changedBy
|
|
48
|
+
.replace('<file>', file)
|
|
49
|
+
.replace('<context>', scope.context.kebab)
|
|
50
|
+
.replace('<table>', declared.table));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Prisma reads the files of one folder: the model joins the file of its context, which the worker
|
|
55
|
+
* of the context owns, and the database schema of the context the datasource of the main file.
|
|
56
|
+
*/
|
|
57
|
+
function declarePrismaModel(scope, context, declared) {
|
|
58
|
+
const models = prismaSchemaOf(scope.context.kebab);
|
|
59
|
+
if (keepsSinglePrismaSchema((file) => scope.ws.exists(file))) {
|
|
60
|
+
throw new CliError(`${singlePrismaSchemaFound()} The model would go to ${models}, which Prisma reads only once prisma.config.ts names ${PRISMA_SCHEMA_FOLDER}.`, `${singlePrismaSchemaSteps(Object.keys(scope.config.contexts))} Then run this command again.`);
|
|
61
|
+
}
|
|
62
|
+
if (scope.ws.read(models) === undefined) {
|
|
63
|
+
scope.ws.create(models, renderTemplate('repository/prisma/schema.prisma.tpl', context));
|
|
64
|
+
}
|
|
65
|
+
declareOnce(scope, { file: models, declared }, renderTemplate(templateOf(declared, 'prisma/model.tpl'), context));
|
|
66
|
+
const content = scope.ws.read(PRISMA_MAIN_SCHEMA);
|
|
67
|
+
if (content !== undefined) {
|
|
68
|
+
scope.ws.update(PRISMA_MAIN_SCHEMA, withDatasourceSchema(content, schemaOfContext(scope.context.kebab)));
|
|
69
|
+
}
|
|
70
|
+
scope.ws.note(`${models} changed: run \`npm run db:client\` to regenerate the client and the schema of the tests.`);
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=declare-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declare-table.js","sourceRoot":"","sources":["../../../src/generate/kinds/declare-table.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAY7B,uHAAuH;AACvH,MAAM,UAAU,YAAY,CAAC,KAAY,EAAE,OAAsB,EAAE,Q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M,2FAA2F,CAAC,CAAC;AACtH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-slug.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/job-slug.ts"],"names":[],"mappings":"AAKA,kKAAkK;AAClK,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { toName } from '../../../naming/index.js';
|
|
2
|
+
/** `ShipDailyJob`, `ImportRowsBackgroundJob` and `import-rows-background-job` name the jobs `ShipDaily` and `ImportRows`. */
|
|
3
|
+
const ROLE_SUFFIX = /(?:[-_]?background)?[-_]?job$/i;
|
|
4
|
+
/** A job as a file name carries it, from its class or from what a person calls it: `ship-daily` of `ShipDailyJob`, `import-rows` of `ImportRowsBackgroundJob`. */
|
|
5
|
+
export function jobSlug(className) {
|
|
6
|
+
return toName(className.replace(ROLE_SUFFIX, '')).kebab;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=job-slug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-slug.js","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/job-slug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,6HAA6H;AAC7H,MAAM,WAAW,GAAG,gCAAgC,CAAC;AAErD,kKAAkK;AAClK,MAAM,UAAU,OAAO,CAAC,SAAiB;IACvC,OAAO,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Name } from '../../../naming/index.js';
|
|
2
|
+
import type { Scope } from '../../scope.js';
|
|
3
|
+
import type { JobStart } from './reaction-of.js';
|
|
4
|
+
/** A function of the end-to-end support a spec starts its use case with. */
|
|
5
|
+
export type Support = 'publish' | 'runJob' | 'runDueJobs';
|
|
6
|
+
/** The end-to-end spec of a use case its jobs start. */
|
|
7
|
+
export interface JobSpec {
|
|
8
|
+
/** Under the name of the use case, or, when `--job` names the job, that name followed by the job: the name of a part of a spec, which leaves the spec of a route alone. */
|
|
9
|
+
readonly file: string;
|
|
10
|
+
readonly content: string;
|
|
11
|
+
/** What the spec calls on the support: `runJob` for a scheduled job, `runDueJobs` for a background one. */
|
|
12
|
+
readonly needs: readonly Support[];
|
|
13
|
+
}
|
|
14
|
+
/** The spec of a use case its jobs start: one test per job, the scheduled one run at once, the background one with what is due on its queue. */
|
|
15
|
+
export declare function jobSpec(scope: Scope, name: Name, { jobs, e2e }: JobStart): JobSpec;
|
|
16
|
+
//# sourceMappingURL=job-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-spec.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/job-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,4EAA4E;AAC5E,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE1D,wDAAwD;AACxD,MAAM,WAAW,OAAO;IACtB,2KAA2K;IAC3K,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2GAA2G;IAC3G,QAAQ,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;CACpC;AAID,gJAAgJ;AAChJ,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,QAAQ,GAAG,OAAO,CAwBlF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { renderTemplate } from '../../../templating/index.js';
|
|
2
|
+
import { named } from '../../named.js';
|
|
3
|
+
import { vars } from '../../vars.js';
|
|
4
|
+
import { jobSlug } from './job-slug.js';
|
|
5
|
+
const GLOBALS = ['afterAll', 'beforeAll', 'beforeEach', 'describe', 'it'];
|
|
6
|
+
/** The spec of a use case its jobs start: one test per job, the scheduled one run at once, the background one with what is due on its queue. */
|
|
7
|
+
export function jobSpec(scope, name, { jobs, e2e }) {
|
|
8
|
+
const caseOf = (job, template) => renderTemplate(template, vars(scope, { name: named(name), job: { ...job } })).trimEnd();
|
|
9
|
+
const cases = [
|
|
10
|
+
...jobs.scheduled.map((job) => caseOf(job, 'e2e/e2e-job-case.ts.tpl')),
|
|
11
|
+
...jobs.background.map((job) => caseOf(job, 'e2e/e2e-background-job-case.ts.tpl')),
|
|
12
|
+
];
|
|
13
|
+
// A background job runs only once a request enqueued it, which the spec asserts.
|
|
14
|
+
const globals = jobs.background.length === 0 ? GLOBALS : [...GLOBALS, 'expect'].sort();
|
|
15
|
+
const starts = startsOf(scope, name, jobs);
|
|
16
|
+
return {
|
|
17
|
+
file: fileOf(scope, name, jobs),
|
|
18
|
+
content: renderTemplate('e2e/e2e-job.spec.ts.tpl', vars(scope, {
|
|
19
|
+
name: named(name),
|
|
20
|
+
e2e: { ...e2e, cases: cases.join('\n\n'), globals: globals.join(', '), starts },
|
|
21
|
+
})),
|
|
22
|
+
needs: needsOf(jobs),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function needsOf(jobs) {
|
|
26
|
+
const scheduled = jobs.scheduled.length === 0 ? [] : ['runJob'];
|
|
27
|
+
const background = jobs.background.length === 0 ? [] : ['runDueJobs'];
|
|
28
|
+
return [...scheduled, ...background];
|
|
29
|
+
}
|
|
30
|
+
function fileOf(scope, name, jobs) {
|
|
31
|
+
const asked = scope.flags.job === undefined ? [] : [...jobs.scheduled, ...jobs.background].slice(0, 1);
|
|
32
|
+
return `test/e2e/${[name.kebab, ...asked.map((job) => jobSlug(job.className))].join('-')}.e2e.spec.ts`;
|
|
33
|
+
}
|
|
34
|
+
/** Why the spec runs jobs, said above its tests. */
|
|
35
|
+
function startsOf(scope, name, jobs) {
|
|
36
|
+
const lead = scope.flags.job === undefined ? `No route starts "${name.words}"` : `"${name.words}" as a job starts it`;
|
|
37
|
+
const ways = [
|
|
38
|
+
...(jobs.scheduled.length === 0
|
|
39
|
+
? []
|
|
40
|
+
: [
|
|
41
|
+
`${namesOf(jobs.scheduled)} sends its command when its schedule is due, so the spec runs the job as the scheduler would`,
|
|
42
|
+
]),
|
|
43
|
+
...(jobs.background.length === 0
|
|
44
|
+
? []
|
|
45
|
+
: [
|
|
46
|
+
`${namesOf(jobs.background)} sends its command once a use case enqueued it, so the spec runs what is due on the queue as the worker would`,
|
|
47
|
+
]),
|
|
48
|
+
];
|
|
49
|
+
return `${lead}: ${ways.join('; ')}.`;
|
|
50
|
+
}
|
|
51
|
+
function namesOf(jobs) {
|
|
52
|
+
return jobs.map((job) => job.name).join(', ');
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=job-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-spec.js","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/job-spec.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAgBrC,MAAM,OAAO,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;AAE1E,gJAAgJ;AAChJ,MAAM,UAAU,OAAO,CAAC,KAAY,EAAE,IAAU,EAAE,EAAE,IAAI,EAAE,GAAG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ACE,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,8FAA8F;aACzH,CAAC;QACN,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;YAC9B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,+GAA+G;aAC3I,CAAC;KACP,CAAC;IAEF,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACxC,CAAC;AAED,SAAS,OAAO,CAAC,IAA2B;IAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { type Name } from '../../../naming/index.js';
|
|
2
2
|
import type { Scope } from '../../scope.js';
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/** A job that sends the command of a use case, as an end-to-end spec starts it. */
|
|
4
|
+
export interface SendingJob {
|
|
5
|
+
/** The name the job runs under, `<context>.<job>`: what the scheduler runs, or the static `jobName` of a background job. */
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly className: string;
|
|
8
|
+
/** The file of the job, which the command builds on. */
|
|
9
|
+
readonly file: string;
|
|
10
|
+
}
|
|
11
|
+
/** The jobs of a context that send the command of a use case. */
|
|
12
|
+
export interface SendingJobs {
|
|
13
|
+
/** Those a schedule runs (`application/scheduling/`). */
|
|
14
|
+
readonly scheduled: readonly SendingJob[];
|
|
15
|
+
/** Those a use case enqueues and a worker runs (`application/background/`). */
|
|
16
|
+
readonly background: readonly SendingJob[];
|
|
17
|
+
}
|
|
18
|
+
/** Each job of the context that sends the command of the use case, scheduled or background. */
|
|
19
|
+
export declare function jobsSending(scope: Scope, name: Name): SendingJobs;
|
|
8
20
|
//# sourceMappingURL=jobs-sending.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-sending.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/jobs-sending.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jobs-sending.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/jobs-sending.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,4HAA4H;IAC5H,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,SAAS,UAAU,EAAE,CAAC;IAC1C,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,EAAE,SAAS,UAAU,EAAE,CAAC;CAC5C;AAED,+FAA+F;AAC/F,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,WAAW,CAEjE"}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
+
import { readBackgroundJobs } from '../../../docs/read-background-jobs.js';
|
|
1
2
|
import { readJobFiles } from '../../../docs/read-job-files.js';
|
|
2
3
|
import { toName } from '../../../naming/index.js';
|
|
3
4
|
import { treeOf } from '../../../model-modules/index.js';
|
|
4
|
-
/**
|
|
5
|
-
* The name of a job as the scheduler knows it, `<context>.<job>`, of each job of the context that
|
|
6
|
-
* sends the command of the use case; the file of each is what the command builds on.
|
|
7
|
-
*/
|
|
5
|
+
/** Each job of the context that sends the command of the use case, scheduled or background. */
|
|
8
6
|
export function jobsSending(scope, name) {
|
|
7
|
+
return { scheduled: scheduledSending(scope, name), background: backgroundSending(scope, name) };
|
|
8
|
+
}
|
|
9
|
+
function scheduledSending(scope, name) {
|
|
9
10
|
const context = scope.context.kebab;
|
|
10
11
|
return readJobFiles(scope.ws, treeOf(scope.config, context), context)
|
|
11
12
|
.filter((job) => job.command === name.pascal)
|
|
12
13
|
.map((job) => {
|
|
13
|
-
|
|
14
|
-
return
|
|
14
|
+
const declared = toName(job.file.slice(job.file.lastIndexOf('/') + 1, -'.job.ts'.length));
|
|
15
|
+
return {
|
|
16
|
+
name: job.name.includes('.') ? job.name : `${context}.${declared.kebab}`,
|
|
17
|
+
className: `${declared.pascal}Job`,
|
|
18
|
+
file: job.file,
|
|
19
|
+
};
|
|
15
20
|
});
|
|
16
21
|
}
|
|
22
|
+
function backgroundSending(scope, name) {
|
|
23
|
+
const sends = new RegExp(String.raw `\bnew ${name.pascal}Command\(`);
|
|
24
|
+
return readBackgroundJobs(scope.ws, treeOf(scope.config, scope.context.kebab)).filter((job) => sends.test(scope.ws.read(job.file) ?? ''));
|
|
25
|
+
}
|
|
17
26
|
//# sourceMappingURL=jobs-sending.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs-sending.js","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/jobs-sending.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAa,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"jobs-sending.js","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/jobs-sending.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,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AAM,CAAC,MAAM,CAAC,GAAG,CAAA,SAAS,IAAI,CAAC,MAAM,WAAW,CAAC,CAAC;IAEpE,OAAO,kBAAkB,CAAC,KAAK,CAAC,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAC5F,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { type Name } from '../../../naming/index.js';
|
|
2
2
|
import type { RenderContext } from '../../../templating/index.js';
|
|
3
3
|
import type { Scope } from '../../scope.js';
|
|
4
|
+
import type { SendingJobs } from './jobs-sending.js';
|
|
4
5
|
/** What an end-to-end spec publishes to start a use case no route reaches, and where a client reads what followed. */
|
|
5
6
|
export interface Reaction {
|
|
6
7
|
readonly upstream: RenderContext;
|
|
7
8
|
readonly e2e: RenderContext;
|
|
8
9
|
}
|
|
9
|
-
/** What an end-to-end spec runs to start a use case no route reaches and no handler does: the jobs that send its command. */
|
|
10
|
+
/** What an end-to-end spec runs to start a use case no route reaches and no handler does, or the one `--job` names: the jobs that send its command. */
|
|
10
11
|
export interface JobStart {
|
|
11
|
-
|
|
12
|
-
readonly jobs: readonly string[];
|
|
12
|
+
readonly jobs: SendingJobs;
|
|
13
13
|
readonly e2e: RenderContext;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* The integration event whose handler sends the command of the use case: the one named with
|
|
17
|
-
* `--event`, or the only one a handler of the context sends that command for. Failing that,
|
|
18
|
-
* jobs of the context that send it.
|
|
17
|
+
* `--event`, or the only one a handler of the context sends that command for. Failing that, or
|
|
18
|
+
* when `--job` names one, the jobs of the context that send it, scheduled or background.
|
|
19
19
|
*/
|
|
20
20
|
export declare function reactionOf(scope: Scope, name: Name, routeFile: string): Reaction | JobStart;
|
|
21
21
|
//# sourceMappingURL=reaction-of.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction-of.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/reaction-of.ts"],"names":[],"mappings":"AAMA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"reaction-of.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/reaction-of.ts"],"names":[],"mappings":"AAMA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,sHAAsH;AACtH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;CAC7B;AAED,uJAAuJ;AACvJ,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CA4B3F"}
|
|
@@ -5,21 +5,21 @@ import { readRoutes } from '../../../describe/read-routes.js';
|
|
|
5
5
|
import { toName } from '../../../naming/index.js';
|
|
6
6
|
import { foundPrerequisite } from '../../found-prerequisite.js';
|
|
7
7
|
import { MissingPrerequisite } from '../../missing-prerequisite.js';
|
|
8
|
-
import {
|
|
8
|
+
import { startingJobs } from './starting-jobs.js';
|
|
9
9
|
import { declaredModules, wiringTextOf } from '../../../model-modules/index.js';
|
|
10
10
|
/**
|
|
11
11
|
* The integration event whose handler sends the command of the use case: the one named with
|
|
12
|
-
* `--event`, or the only one a handler of the context sends that command for. Failing that,
|
|
13
|
-
* jobs of the context that send it.
|
|
12
|
+
* `--event`, or the only one a handler of the context sends that command for. Failing that, or
|
|
13
|
+
* when `--job` names one, the jobs of the context that send it, scheduled or background.
|
|
14
14
|
*/
|
|
15
15
|
export function reactionOf(scope, name, routeFile) {
|
|
16
16
|
const sources = sourcesOf(scope);
|
|
17
17
|
const consumed = readConsumedEvents(sources);
|
|
18
18
|
const useCase = { scope, name, consumed };
|
|
19
19
|
const asked = scope.flags.event;
|
|
20
|
-
const event =
|
|
21
|
-
const jobs = event === undefined ?
|
|
22
|
-
if (event === undefined && jobs.length === 0) {
|
|
20
|
+
const event = eventOf(useCase, asked);
|
|
21
|
+
const jobs = event === undefined ? startingJobs(scope, name) : { scheduled: [], background: [] };
|
|
22
|
+
if (event === undefined && jobs.scheduled.length + jobs.background.length === 0) {
|
|
23
23
|
throw noTrigger(useCase, routeFile);
|
|
24
24
|
}
|
|
25
25
|
if (event !== undefined) {
|
|
@@ -29,13 +29,20 @@ export function reactionOf(scope, name, routeFile) {
|
|
|
29
29
|
.filter((route) => route.method === 'GET')
|
|
30
30
|
.map((route) => `GET ${route.path}`);
|
|
31
31
|
if (event === undefined) {
|
|
32
|
-
return { jobs, e2e: { reads: reads.join(', '), readable: reads.length > 0
|
|
32
|
+
return { jobs, e2e: { reads: reads.join(', '), readable: reads.length > 0 } };
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
35
|
upstream: upstreamVars(scope, event),
|
|
36
36
|
e2e: { reads: reads.join(', '), readable: reads.length > 0, handlers: handlersOf(consumed, event.type) },
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
+
/** No event when `--job` names what starts the use case: the spec is the one of that job. */
|
|
40
|
+
function eventOf(useCase, asked) {
|
|
41
|
+
if (useCase.scope.flags.job !== undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
return asked === undefined ? sentFor(useCase) : handledOf(useCase, asked);
|
|
45
|
+
}
|
|
39
46
|
function sourcesOf(scope) {
|
|
40
47
|
const { ws, config, context, dir } = scope;
|
|
41
48
|
return {
|
|
@@ -64,7 +71,7 @@ function sentFor(useCase) {
|
|
|
64
71
|
}
|
|
65
72
|
function noTrigger({ scope, name, consumed }, routeFile) {
|
|
66
73
|
const handled = consumed.length === 0 ? '' : ` (handled here: ${typesOf(consumed).join(', ')})`;
|
|
67
|
-
return new MissingPrerequisite(`The use case ${name.pascal} has no route in "${scope.context.kebab}" (${routeFile}), no integration event handler of it sends ${name.pascal}Command, and no job of it does (application/scheduling/*.job.ts).`, `An end-to-end spec drives the application through HTTP, through the integration event that starts the use case, or through the job that runs it: create the route first with \`ddd-ts-kit generate route ${scope.context.kebab} ${name.pascal} --method <M> --path <path>\`, create the job with \`ddd-ts-kit generate job ${scope.context.kebab} <JobName> --every <duration> --command ${name.pascal}
|
|
74
|
+
return new MissingPrerequisite(`The use case ${name.pascal} has no route in "${scope.context.kebab}" (${routeFile}), no integration event handler of it sends ${name.pascal}Command, and no job of it does (application/scheduling/*.job.ts, application/background/*.background-job.ts).`, `An end-to-end spec drives the application through HTTP, through the integration event that starts the use case, or through the job that runs it: create the route first with \`ddd-ts-kit generate route ${scope.context.kebab} ${name.pascal} --method <M> --path <path>\`, create the job with \`ddd-ts-kit generate job ${scope.context.kebab} <JobName> --every <duration> --command ${name.pascal}\` (or \`generate background-job ${scope.context.kebab} <Name> --command ${name.pascal}\` for one a use case enqueues), or name the event its handler receives with --event <context>.<aggregate>.<fact>${handled}.`);
|
|
68
75
|
}
|
|
69
76
|
/** The event named with `--event`: a handler of the context receives it, and the command it starts exists. */
|
|
70
77
|
function handledOf({ scope, name, consumed }, asked) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction-of.js","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/reaction-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAa,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"reaction-of.js","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/reaction-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAa,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAcvE;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAAY,EAAE,IAAU,EAAE,SAAiB;IACpE,MAAM,OAAO,GAAG,SAAS,CAAC,KAA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AG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEjD,OAAO;QACL,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;QACrB,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,KAAK,EAAE,QAAQ,KAAK,SAAS;QAC7B,UAAU,EAAE,QAAQ,EAAE,IAAI,IAAI,EAAE;QAChC,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC;QAC3B,qDAAqD;QACrD,UAAU,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI;QAC1C,aAAa,EAAE,GAAG,SAAS,IAAI;KAChC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Name } from '../../../naming/index.js';
|
|
2
|
+
import type { Scope } from '../../scope.js';
|
|
3
|
+
import { type SendingJobs } from './jobs-sending.js';
|
|
4
|
+
/**
|
|
5
|
+
* The jobs an end-to-end spec starts the use case with: every job of the context that sends its
|
|
6
|
+
* command, or the one `--job` names, by its class (`ImportRows`, `ImportRowsBackgroundJob`) or by
|
|
7
|
+
* the name it runs under (`shipping.import-rows`). The file of each is what the command builds on.
|
|
8
|
+
*/
|
|
9
|
+
export declare function startingJobs(scope: Scope, name: Name): SendingJobs;
|
|
10
|
+
//# sourceMappingURL=starting-jobs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starting-jobs.d.ts","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/starting-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAgC,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,WAAW,CAmBlE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MissingPrerequisite } from '../../missing-prerequisite.js';
|
|
2
|
+
import { jobSlug } from './job-slug.js';
|
|
3
|
+
import { jobsSending } from './jobs-sending.js';
|
|
4
|
+
/**
|
|
5
|
+
* The jobs an end-to-end spec starts the use case with: every job of the context that sends its
|
|
6
|
+
* command, or the one `--job` names, by its class (`ImportRows`, `ImportRowsBackgroundJob`) or by
|
|
7
|
+
* the name it runs under (`shipping.import-rows`). The file of each is what the command builds on.
|
|
8
|
+
*/
|
|
9
|
+
export function startingJobs(scope, name) {
|
|
10
|
+
const sending = jobsSending(scope, name);
|
|
11
|
+
const asked = scope.flags.job;
|
|
12
|
+
const kept = (jobs) => jobs.filter((job) => asked === undefined || isNamed(job, asked));
|
|
13
|
+
const starting = { scheduled: kept(sending.scheduled), background: kept(sending.background) };
|
|
14
|
+
const all = [...starting.scheduled, ...starting.background];
|
|
15
|
+
if (asked !== undefined && all.length === 0) {
|
|
16
|
+
throw notSending({ scope, name, asked }, sending);
|
|
17
|
+
}
|
|
18
|
+
for (const job of all) {
|
|
19
|
+
scope.flags.builtOn?.(scope.ws.placed(job.file));
|
|
20
|
+
}
|
|
21
|
+
return starting;
|
|
22
|
+
}
|
|
23
|
+
function isNamed(job, asked) {
|
|
24
|
+
return asked.includes('.') ? asked === job.name : jobSlug(asked) === jobSlug(job.className);
|
|
25
|
+
}
|
|
26
|
+
function notSending({ scope, name, asked }, sending) {
|
|
27
|
+
const context = scope.context.kebab;
|
|
28
|
+
const senders = [...sending.scheduled, ...sending.background].map((job) => `${job.className} (${job.name})`);
|
|
29
|
+
return new MissingPrerequisite(`No job of "${context}" named ${asked} sends ${name.pascal}Command.`, senders.length === 0
|
|
30
|
+
? `Create the job first with \`ddd-ts-kit generate job ${context} <JobName> --every <duration> --command ${name.pascal}\` (a schedule runs it) or \`ddd-ts-kit generate background-job ${context} <Name> --command ${name.pascal}\` (a use case enqueues it).`
|
|
31
|
+
: `Pass --job with one of the jobs that send it: ${senders.join(', ')}.`);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=starting-jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starting-jobs.js","sourceRoot":"","sources":["../../../../src/generate/kinds/e2e/starting-jobs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAqC,MAAM,gBAAgB,CAAC;AAEhF;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAY,EAAE,IAAU;IACnD,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;IAE9B,MAAM,IAAI,GAAG,CAAC,IAA2B,EAAgB,EAAE,CACzD,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnE,MAAM,QAAQ,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAC9F,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,SAAS,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IAE5D,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5C,MAAM,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;Q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ind.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/e2e-kind.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAapC,eAAO,MAAM,OAAO,EAAE,IAiBrB,CAAC"}
|