ddd-ts-kit 0.96.0 → 0.98.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 +142 -0
- package/README.fr.md +9 -7
- package/README.md +8 -6
- package/dist/check/authz/operator-tuples.d.ts +16 -0
- package/dist/check/authz/operator-tuples.d.ts.map +1 -0
- package/dist/check/authz/operator-tuples.js +29 -0
- package/dist/check/authz/operator-tuples.js.map +1 -0
- package/dist/check/authz/own-authorizer.d.ts +9 -0
- package/dist/check/authz/own-authorizer.d.ts.map +1 -0
- package/dist/check/authz/own-authorizer.js +15 -0
- package/dist/check/authz/own-authorizer.js.map +1 -0
- package/dist/check/canonical/stray-entry.d.ts.map +1 -1
- package/dist/check/canonical/stray-entry.js +14 -2
- package/dist/check/canonical/stray-entry.js.map +1 -1
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +4 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/domain-events/event-handlers-of.d.ts.map +1 -1
- package/dist/check/domain-events/event-handlers-of.js +21 -8
- package/dist/check/domain-events/event-handlers-of.js.map +1 -1
- package/dist/check/events/consumer-registrations.d.ts +2 -0
- package/dist/check/events/consumer-registrations.d.ts.map +1 -1
- package/dist/check/events/consumer-registrations.js +44 -2
- package/dist/check/events/consumer-registrations.js.map +1 -1
- package/dist/check/explain/authz-docs.d.ts.map +1 -1
- package/dist/check/explain/authz-docs.js +12 -1
- package/dist/check/explain/authz-docs.js.map +1 -1
- package/dist/check/explain/events-docs.js +1 -1
- package/dist/check/explain/events-docs.js.map +1 -1
- package/dist/check/explain/scheduling-docs.d.ts.map +1 -1
- package/dist/check/explain/scheduling-docs.js +22 -0
- package/dist/check/explain/scheduling-docs.js.map +1 -1
- package/dist/check/explain/tree-docs.d.ts.map +1 -1
- package/dist/check/explain/tree-docs.js +7 -4
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/explain/wiring-docs.js +1 -1
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/authz-granted-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/authz-granted-fixtures.js +69 -0
- package/dist/check/fixtures/authz-granted-fixtures.js.map +1 -1
- package/dist/check/fixtures/authz-resource-modelled-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/authz-resource-modelled-fixtures.js +5 -0
- package/dist/check/fixtures/authz-resource-modelled-fixtures.js.map +1 -1
- package/dist/check/fixtures/authz-system-actor-granted-fixtures.d.ts +3 -0
- package/dist/check/fixtures/authz-system-actor-granted-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/authz-system-actor-granted-fixtures.js +89 -0
- package/dist/check/fixtures/authz-system-actor-granted-fixtures.js.map +1 -0
- package/dist/check/fixtures/consumer-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/consumer-fixtures.js +33 -0
- package/dist/check/fixtures/consumer-fixtures.js.map +1 -1
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +2 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/scheduling-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/scheduling-fixtures.js +47 -1
- package/dist/check/fixtures/scheduling-fixtures.js.map +1 -1
- package/dist/check/project/locate.js +9 -3
- package/dist/check/project/locate.js.map +1 -1
- package/dist/check/rules/authz-granted.d.ts +19 -6
- package/dist/check/rules/authz-granted.d.ts.map +1 -1
- package/dist/check/rules/authz-granted.js +59 -7
- package/dist/check/rules/authz-granted.js.map +1 -1
- package/dist/check/rules/authz-system-actor-granted.d.ts +15 -0
- package/dist/check/rules/authz-system-actor-granted.d.ts.map +1 -0
- package/dist/check/rules/authz-system-actor-granted.js +91 -0
- package/dist/check/rules/authz-system-actor-granted.js.map +1 -0
- package/dist/check/rules/composition-only-in-module.js +2 -2
- package/dist/check/rules/composition-only-in-module.js.map +1 -1
- package/dist/check/rules/declarations-port-adapter-wired.js +1 -1
- package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -1
- package/dist/check/rules/events-consumer-idempotent.d.ts.map +1 -1
- package/dist/check/rules/events-consumer-idempotent.js +6 -3
- package/dist/check/rules/events-consumer-idempotent.js.map +1 -1
- package/dist/check/rules/scheduling-job-registered.d.ts +12 -0
- package/dist/check/rules/scheduling-job-registered.d.ts.map +1 -0
- package/dist/check/rules/scheduling-job-registered.js +40 -0
- package/dist/check/rules/scheduling-job-registered.js.map +1 -0
- package/dist/check/rules/tree-closed.js +1 -1
- package/dist/check/rules/tree-closed.js.map +1 -1
- package/dist/check/scheduling/job-classes.d.ts +13 -0
- package/dist/check/scheduling/job-classes.d.ts.map +1 -0
- package/dist/check/scheduling/job-classes.js +32 -0
- package/dist/check/scheduling/job-classes.js.map +1 -0
- package/dist/commands/generate.js +3 -1
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/prisma-generate.d.ts.map +1 -1
- package/dist/commands/prisma-generate.js +2 -1
- package/dist/commands/prisma-generate.js.map +1 -1
- package/dist/commands/typeorm-generate.d.ts.map +1 -1
- package/dist/commands/typeorm-generate.js +2 -1
- package/dist/commands/typeorm-generate.js.map +1 -1
- package/dist/describe/context-sources.d.ts +1 -1
- package/dist/describe/context-sources.d.ts.map +1 -1
- package/dist/describe/describe-context.js +2 -2
- package/dist/describe/describe-context.js.map +1 -1
- package/dist/docs/personal-declarations-in.js +6 -1
- package/dist/docs/personal-declarations-in.js.map +1 -1
- package/dist/docs/personal-table-cells.js +7 -1
- package/dist/docs/personal-table-cells.js.map +1 -1
- package/dist/docs/personal-table-facts.d.ts +1 -1
- package/dist/docs/personal-table-facts.d.ts.map +1 -1
- package/dist/docs/read-jobs.d.ts +1 -1
- package/dist/docs/read-jobs.d.ts.map +1 -1
- package/dist/docs/read-jobs.js +3 -3
- package/dist/docs/read-jobs.js.map +1 -1
- package/dist/generate/apply-wiring.js +1 -1
- package/dist/generate/apply-wiring.js.map +1 -1
- package/dist/generate/kind.d.ts +2 -0
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +2 -2
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/ask-policy-in-generated-use-case.d.ts.map +1 -1
- package/dist/generate/kinds/ask-policy-in-generated-use-case.js +10 -4
- package/dist/generate/kinds/ask-policy-in-generated-use-case.js.map +1 -1
- package/dist/generate/kinds/command-context.d.ts +5 -2
- package/dist/generate/kinds/command-context.d.ts.map +1 -1
- package/dist/generate/kinds/command-context.js +11 -3
- package/dist/generate/kinds/command-context.js.map +1 -1
- package/dist/generate/kinds/command-kind.d.ts.map +1 -1
- package/dist/generate/kinds/command-kind.js +9 -4
- package/dist/generate/kinds/command-kind.js.map +1 -1
- package/dist/generate/kinds/e2e/jobs-sending.d.ts +5 -0
- package/dist/generate/kinds/e2e/jobs-sending.d.ts.map +1 -0
- package/dist/generate/kinds/e2e/jobs-sending.js +11 -0
- package/dist/generate/kinds/e2e/jobs-sending.js.map +1 -0
- package/dist/generate/kinds/e2e/reaction-of.d.ts +9 -2
- package/dist/generate/kinds/e2e/reaction-of.d.ts.map +1 -1
- package/dist/generate/kinds/e2e/reaction-of.js +16 -7
- package/dist/generate/kinds/e2e/reaction-of.js.map +1 -1
- package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
- package/dist/generate/kinds/e2e-kind.js +20 -5
- package/dist/generate/kinds/e2e-kind.js.map +1 -1
- package/dist/generate/kinds/erasure-handler-kind.js +7 -0
- package/dist/generate/kinds/erasure-handler-kind.js.map +1 -1
- package/dist/generate/kinds/extend-event-sourced-aggregate.js +2 -2
- package/dist/generate/kinds/extend-event-sourced-aggregate.js.map +1 -1
- package/dist/generate/kinds/integration-handler-kind.d.ts.map +1 -1
- package/dist/generate/kinds/integration-handler-kind.js +1 -13
- package/dist/generate/kinds/integration-handler-kind.js.map +1 -1
- package/dist/generate/kinds/job/grant-system-actor.js +4 -2
- package/dist/generate/kinds/job/grant-system-actor.js.map +1 -1
- package/dist/generate/kinds/job/read-sent-command.d.ts.map +1 -1
- package/dist/generate/kinds/job/read-sent-command.js +2 -1
- package/dist/generate/kinds/job/read-sent-command.js.map +1 -1
- package/dist/generate/kinds/module-kind.d.ts.map +1 -1
- package/dist/generate/kinds/module-kind.js +22 -2
- package/dist/generate/kinds/module-kind.js.map +1 -1
- package/dist/generate/kinds/projection-kind.d.ts.map +1 -1
- package/dist/generate/kinds/projection-kind.js +15 -10
- package/dist/generate/kinds/projection-kind.js.map +1 -1
- package/dist/generate/kinds/repository-line.d.ts +4 -0
- package/dist/generate/kinds/repository-line.d.ts.map +1 -0
- package/dist/generate/kinds/repository-line.js +5 -0
- package/dist/generate/kinds/repository-line.js.map +1 -0
- package/dist/generate/kinds/subscription-vars.d.ts +8 -0
- package/dist/generate/kinds/subscription-vars.d.ts.map +1 -0
- package/dist/generate/kinds/subscription-vars.js +14 -0
- package/dist/generate/kinds/subscription-vars.js.map +1 -0
- package/dist/generate/kinds/wire-repository-on-first-use.d.ts +3 -2
- package/dist/generate/kinds/wire-repository-on-first-use.d.ts.map +1 -1
- package/dist/generate/kinds/wire-repository-on-first-use.js +8 -3
- package/dist/generate/kinds/wire-repository-on-first-use.js.map +1 -1
- package/dist/generate/refuse-shared-writes.d.ts +1 -1
- package/dist/generate/refuse-shared-writes.d.ts.map +1 -1
- package/dist/generate/refuse-shared-writes.js +25 -2
- package/dist/generate/refuse-shared-writes.js.map +1 -1
- package/dist/generate/registration.d.ts +10 -0
- package/dist/generate/registration.d.ts.map +1 -0
- package/dist/generate/registration.js +2 -0
- package/dist/generate/registration.js.map +1 -0
- package/dist/generate/wire.d.ts +5 -2
- package/dist/generate/wire.d.ts.map +1 -1
- package/dist/generate/wire.js +6 -3
- package/dist/generate/wire.js.map +1 -1
- package/dist/generate/wirings.d.ts +2 -1
- package/dist/generate/wirings.d.ts.map +1 -1
- package/dist/generate/wirings.js +25 -4
- package/dist/generate/wirings.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +5 -2
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/first-install-note.d.ts.map +1 -1
- package/dist/init/first-install-note.js +1 -0
- package/dist/init/first-install-note.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/migration/ensure-database-reachable.d.ts +13 -0
- package/dist/migration/ensure-database-reachable.d.ts.map +1 -0
- package/dist/migration/ensure-database-reachable.js +51 -0
- package/dist/migration/ensure-database-reachable.js.map +1 -0
- package/dist/migration/index.d.ts +1 -0
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +1 -0
- package/dist/migration/index.js.map +1 -1
- package/dist/model-modules/index.d.ts +4 -0
- package/dist/model-modules/index.d.ts.map +1 -1
- package/dist/model-modules/index.js +4 -0
- package/dist/model-modules/index.js.map +1 -1
- package/dist/model-modules/module-file-of.d.ts +7 -0
- package/dist/model-modules/module-file-of.d.ts.map +1 -0
- package/dist/model-modules/module-file-of.js +9 -0
- package/dist/model-modules/module-file-of.js.map +1 -0
- package/dist/model-modules/module-of-module-file.d.ts +3 -0
- package/dist/model-modules/module-of-module-file.d.ts.map +1 -0
- package/dist/model-modules/module-of-module-file.js +6 -0
- package/dist/model-modules/module-of-module-file.js.map +1 -0
- package/dist/model-modules/wiring-files-of.d.ts +4 -0
- package/dist/model-modules/wiring-files-of.d.ts.map +1 -0
- package/dist/model-modules/wiring-files-of.js +6 -0
- package/dist/model-modules/wiring-files-of.js.map +1 -0
- package/dist/model-modules/wiring-text-of.d.ts +5 -0
- package/dist/model-modules/wiring-text-of.d.ts.map +1 -0
- package/dist/model-modules/wiring-text-of.js +8 -0
- package/dist/model-modules/wiring-text-of.js.map +1 -0
- package/dist/presets/apply-preset.d.ts.map +1 -1
- package/dist/presets/apply-preset.js +5 -0
- package/dist/presets/apply-preset.js.map +1 -1
- package/dist/presets/identity-preset.d.ts.map +1 -1
- package/dist/presets/identity-preset.js +1 -0
- package/dist/presets/identity-preset.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/presets/preset.d.ts +6 -0
- package/dist/presets/preset.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/add-worktree.d.ts +5 -1
- package/dist/worker/add-worktree.d.ts.map +1 -1
- package/dist/worker/add-worktree.js +6 -2
- package/dist/worker/add-worktree.js.map +1 -1
- package/dist/workspace/workspace.d.ts +2 -1
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/dist/workspace/workspace.js +6 -5
- package/dist/workspace/workspace.js.map +1 -1
- package/package.json +4 -4
- package/templates/aggregate/event-sourced.events.mapper.ts.tpl +2 -2
- package/templates/command/handler.declared.ts.tpl +39 -1
- package/templates/command/handler.spec.buses.ts.tpl +4 -4
- package/templates/command/handler.spec.tsyringe.ts.tpl +2 -2
- package/templates/command/handler.ts.tpl +38 -1
- package/templates/command/wiring.manual.tpl +4 -1
- package/templates/command/wiring.tsyringe.tpl +7 -2
- package/templates/e2e/e2e-job-case.ts.tpl +8 -0
- package/templates/e2e/e2e-job.spec.ts.tpl +43 -0
- package/templates/init/e2e/start-application.database.ts.tpl +94 -9
- package/templates/init/e2e/start-application.memory.ts.tpl +76 -9
- package/templates/init/jest.config.js.tpl +11 -2
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +11 -2
- package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +4 -0
- package/templates/init/platform/database/open-test-database.drizzle.ts.tpl +1 -5
- package/templates/init/platform/database/open-test-database.knex.ts.tpl +1 -5
- package/templates/init/platform/database/open-test-database.prisma.ts.tpl +1 -5
- package/templates/init/platform/database/open-test-database.typeorm.ts.tpl +1 -5
- package/templates/init/platform/database/test-database-teardown.ts.tpl +11 -0
- package/templates/init/platform/database/test-database-template.ts.tpl +16 -1
- package/templates/init/rules/tests.md.tpl +1 -1
- package/templates/module/module-file.manual.ts.tpl +46 -0
- package/templates/module/module-file.tsyringe.ts.tpl +14 -0
- package/templates/module/wiring.manual.tpl +14 -0
- package/templates/module/wiring.tsyringe.tpl +6 -0
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/presets/identity/context/__context__.module.explicit.ts.tpl +10 -4
- package/templates/presets/identity/e2e/support.wiring.tpl +17 -0
- package/templates/projection/projection.manual.ts.tpl +8 -0
- package/templates/projection/wiring.manual.tpl +22 -0
- package/templates/projection/wiring.tsyringe.tpl +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architecture-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-handlers-of.d.ts","sourceRoot":"","sources":["../../../src/check/domain-events/event-handlers-of.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event-handlers-of.d.ts","sourceRoot":"","sources":["../../../src/check/domain-events/event-handlers-of.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQpD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,YAAY,EAAE,CAmClF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { treeOf, wiringFilesOf } from '../../model-modules/index.js';
|
|
1
2
|
import { classesOf } from '../declarations/classes-of.js';
|
|
2
3
|
import { optionOf } from '../declarations/option-of.js';
|
|
3
4
|
import { sourceAt } from '../project/source-at.js';
|
|
@@ -22,7 +23,7 @@ export function eventHandlersOf(project, file) {
|
|
|
22
23
|
const wired = isRoleFile(file)
|
|
23
24
|
? file.structure.classes.filter((shape) => shape.isExported && shape.depth === 0 && !known.has(shape.name))
|
|
24
25
|
: [];
|
|
25
|
-
const
|
|
26
|
+
const modules = wired.length === 0 ? [] : moduleFiles(project, context);
|
|
26
27
|
return [
|
|
27
28
|
...declared.map((handler) => ({
|
|
28
29
|
name: handler.name,
|
|
@@ -31,15 +32,27 @@ export function eventHandlersOf(project, file) {
|
|
|
31
32
|
isAfterCommit: declaresAfterCommit(file, handler),
|
|
32
33
|
dependencies: handlerDependencies(file, handler.name),
|
|
33
34
|
})),
|
|
34
|
-
...wired.map(({ name, line }) =>
|
|
35
|
-
name
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
...wired.map(({ name, line }) => {
|
|
36
|
+
const module = registeringModule(modules, name);
|
|
37
|
+
return {
|
|
38
|
+
name,
|
|
39
|
+
line,
|
|
40
|
+
context,
|
|
41
|
+
isAfterCommit: isRegisteredAfterCommit(module, name),
|
|
42
|
+
dependencies: [...handlerDependencies(file, name), ...boundByModule(module, { name, line })],
|
|
43
|
+
};
|
|
44
|
+
}),
|
|
41
45
|
];
|
|
42
46
|
}
|
|
47
|
+
/** The module file of the context, then the one of each module of its model that exists. */
|
|
48
|
+
function moduleFiles(project, context) {
|
|
49
|
+
return wiringFilesOf(treeOf(project.config, context), context).flatMap((path) => sourceAt(project, path) ?? []);
|
|
50
|
+
}
|
|
51
|
+
/** The module file that registers a class: the first that names it, else the module file of the context. */
|
|
52
|
+
function registeringModule(modules, name) {
|
|
53
|
+
const named = new RegExp(`(?<![\\w$])${name}(?![\\w$])`);
|
|
54
|
+
return modules.find((module) => named.test(module.scan.code)) ?? modules[0];
|
|
55
|
+
}
|
|
43
56
|
function isRoleFile(file) {
|
|
44
57
|
const [folder, inside] = inLayer(file, 'application')?.inside ?? [];
|
|
45
58
|
if (folder === 'event-handlers') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-handlers-of.js","sourceRoot":"","sources":["../../../src/check/domain-events/event-handlers-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,SAAS,GAAG,oBAAoB,CAAC;AACvC,MAAM,YAAY,GAAG,cAAc,CAAC;AAEpC;;;;;GAKG;A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/** False for a free `on` or `consume` that is given no processed-event store. */
|
|
10
10
|
readonly deduplicates: boolean;
|
|
11
|
+
/** True when the options spread an object whose content this file does not show, and nothing else gives `processed`. */
|
|
12
|
+
readonly spreadsUnreadable: boolean;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Calls that subscribe a consumer under a name: `builder.on(definition, { consumer })`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumer-registrations.d.ts","sourceRoot":"","sources":["../../../src/check/events/consumer-registrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"consumer-registrations.d.ts","sourceRoot":"","sources":["../../../src/check/events/consumer-registrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAavD,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,wHAAwH;IACxH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;CACrC;AAQD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,GAAG,oBAAoB,EAAE,CAgC9E"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { chainEnd } from '../text/chain-end.js';
|
|
2
|
+
import { escapeRegExp } from '../text/escape-reg-exp.js';
|
|
3
|
+
import { matchingBracket } from '../text/matching-bracket.js';
|
|
2
4
|
const CALL = /(?:(\.)\s*|(?<![\w$.]))(on|consume|idempotent)\s*(?:<[^<>()]*>)?\s*\(/g;
|
|
3
5
|
const CONSUMER_KEY = /(?<![\w$.])consumer\s*:\s*$/;
|
|
4
6
|
const CONSUMER_OPTION = /(?<![\w$.])consumer\s*[:,}]/;
|
|
5
7
|
const STORE_OPTION = /(?<![\w$.])processed\s*[:,}]/;
|
|
8
|
+
const SPREAD = /\.\.\.\s*([A-Za-z_$][\w$]*)\s*(?=[,}])/g;
|
|
9
|
+
const OPTIONS_TYPE = /^(?:Readonly\s*<\s*)?ConsumeOptions\b|^Omit\s*<\s*ConsumeOptions\s*,([^>]*)>/;
|
|
6
10
|
/**
|
|
7
11
|
* Calls that subscribe a consumer under a name: `builder.on(definition, { consumer })`,
|
|
8
12
|
* `consume(definition, { consumer, processed, unitOfWork }, handler)`,
|
|
@@ -19,10 +23,27 @@ export function consumerRegistrations(file) {
|
|
|
19
23
|
return [];
|
|
20
24
|
}
|
|
21
25
|
const line = file.scan.lineAt(span.start);
|
|
22
|
-
const deduplicates = match[1] !== undefined || match[2] === 'idempotent'
|
|
23
|
-
return [
|
|
26
|
+
const { deduplicates, spreadsUnreadable } = storeOf(file, registered, match[1] !== undefined || match[2] === 'idempotent');
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
code: registered,
|
|
30
|
+
line,
|
|
31
|
+
name: literal?.value,
|
|
32
|
+
nameLine: literal?.line ?? line,
|
|
33
|
+
deduplicates,
|
|
34
|
+
spreadsUnreadable,
|
|
35
|
+
},
|
|
36
|
+
];
|
|
24
37
|
});
|
|
25
38
|
}
|
|
39
|
+
function storeOf(file, registered, given) {
|
|
40
|
+
if (given || STORE_OPTION.test(registered)) {
|
|
41
|
+
return { deduplicates: true, spreadsUnreadable: false };
|
|
42
|
+
}
|
|
43
|
+
const spreads = [...registered.matchAll(SPREAD)].map((spread) => spread[1] ?? '');
|
|
44
|
+
const deduplicates = spreads.some((name) => spreadCarriesStore(file, name));
|
|
45
|
+
return { deduplicates, spreadsUnreadable: !deduplicates && spreads.length > 0 };
|
|
46
|
+
}
|
|
26
47
|
function firstLiteral(file, { open, end }) {
|
|
27
48
|
return file.scan.strings.find((literal) => literal.start >= open && literal.start < end && file.scan.code.slice(open, literal.start).trim() === '');
|
|
28
49
|
}
|
|
@@ -32,4 +53,25 @@ function optionLiteral(file, { open, end }) {
|
|
|
32
53
|
literal.start < end &&
|
|
33
54
|
CONSUMER_KEY.test(code.slice(Math.max(open, literal.start - 40), literal.start)));
|
|
34
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Whether the object spread under `name` shows `processed` in this file: a `const` initialised with an
|
|
58
|
+
* object literal that carries it, or a `const` or a parameter typed with `ConsumeOptions`.
|
|
59
|
+
*/
|
|
60
|
+
function spreadCarriesStore(file, name) {
|
|
61
|
+
const { code } = file.scan;
|
|
62
|
+
const word = escapeRegExp(name);
|
|
63
|
+
const initialised = new RegExp(`\\b(?:const|let)\\s+${word}\\s*(?::[^=]*)?=\\s*\\{`).exec(code);
|
|
64
|
+
if (initialised !== null) {
|
|
65
|
+
const open = initialised.index + initialised[0].length - 1;
|
|
66
|
+
if (STORE_OPTION.test(code.slice(open, matchingBracket(code, open) + 1))) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const typed = new RegExp(`(?<![\\w$.])${word}\\s*\\??:\\s*`, 'g');
|
|
71
|
+
return [...code.matchAll(typed)].some((declared) => {
|
|
72
|
+
const start = declared.index + declared[0].length;
|
|
73
|
+
const type = OPTIONS_TYPE.exec(file.text.slice(start, start + 120));
|
|
74
|
+
return type !== null && !/\bprocessed\b/.test(type[1] ?? '');
|
|
75
|
+
});
|
|
76
|
+
}
|
|
35
77
|
//# sourceMappingURL=consumer-registrations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumer-registrations.js","sourceRoot":"","sources":["../../../src/check/events/consumer-registrations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{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,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAE3D,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACzE,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,eAAe,IAAI,eAAe,EAAE,GAAG,CAAC,CAAC;IAElE,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QACjD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAClD,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC;QAEpE,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"authz-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA6HxD,CAAC"}
|
|
@@ -29,7 +29,7 @@ await this.access.authorize(command.actor, billingPermissions['invoice.void'], i
|
|
|
29
29
|
export class OnlyIssuerVoidsPolicy {}`,
|
|
30
30
|
},
|
|
31
31
|
'authz/granted': {
|
|
32
|
-
why: "In a project whose rights are roles (stack.authz rbac), a permission does two things: a use case requires it, and a role holds it. The generator declares the first; the grant lives in the roles of the platform. The super-admin holds the wildcard `*`, so a permission no role names is reachable by administrators only, the checks stay green and the people the use case was written for are refused at run time. It fails closed, which is safe, but silently. Judged: every key of every `definePermissions` set of a context is named in `<platformDir>/auth/roles/roles.ts` or in what every signed-in person holds (`signed-in-grants.ts`, which a context preset writes), by the entry of its set (`billingPermissions['invoice.issue']`), by its id (`'billing:invoice.issue'`) or by the wildcard of its context (`'billing:*'`); the bare `*` does not count, and a grant to `Role.System` does. A permission meant for administrators only is granted to `Role.Admin` by name, so that the intent is read in review. Silent when the rights are attributes
|
|
32
|
+
why: "In a project whose rights are roles (stack.authz rbac), a permission does two things: a use case requires it, and a role holds it. The generator declares the first; the grant lives in the roles of the platform. The super-admin holds the wildcard `*`, so a permission no role names is reachable by administrators only, the checks stay green and the people the use case was written for are refused at run time. It fails closed, which is safe, but silently. Judged: every key of every `definePermissions` set of a context is named in `<platformDir>/auth/roles/roles.ts` or in what every signed-in person holds (`signed-in-grants.ts`, which a context preset writes), by the entry of its set (`billingPermissions['invoice.issue']`), by its id (`'billing:invoice.issue'`) or by the wildcard of its context (`'billing:*'`); the bare `*` does not count, and a grant to `Role.System` does. A permission meant for administrators only is granted to `Role.Admin` by name, so that the intent is read in review. Silent when the rights are attributes or an authorizer of the project, and when the platform has no roles file. Under relationships (stack.authz rebac) the same question is asked of the operators: a permission the schema leaves on the context (the schema `init` writes derives on `context` every permission no element derives) is held by the operators of the context, and nobody is an operator until a relationship says so. It is granted when every signed-in person holds it (`signed-in-grants.ts`), or when a source outside the tests writes `{ object: 'context:<context>', relation: 'operator', subject: '<subject>' }` for it, a person (`user:<id>`: a bootstrap, a provisioning step) or a system actor, which holds the permissions of a use case only the system sends (`authz/system-actor-granted` judges that line itself). A permission derived on an element is held through relations the use cases write at run time: not judged. Judged only in a project that provisions operators in its tree, that is when some source makes a person (a subject other than `system:..`) operator of a context: a project that writes none provisions them out of the tree (a seed, an administration tool), and a generated project is silent until the team writes the first. Silent when the checker cannot read the schema (`authz/resource-modelled` says so), finds an operator tuple whose context it cannot read, or the project decides with an authorizer of its own (`createAuthorizer` imports a `*Authorizer` of the project), which may grant what the schema does not. A warning: it fails closed, and a permission granted to nobody can be a state between two slices.",
|
|
33
33
|
bad: `// contexts/billing/application/authorization/billing.permissions.ts
|
|
34
34
|
export const billingPermissions = definePermissions('billing', {
|
|
35
35
|
'invoice.void': { description: 'Void invoice' },
|
|
@@ -112,5 +112,16 @@ const answer = withFieldAccess(classSchema(GetAppointmentAnswer), {
|
|
|
112
112
|
internalNote: { read: { permission: schedulingPermissions['appointment.note.read'] } },
|
|
113
113
|
});`,
|
|
114
114
|
},
|
|
115
|
+
'authz/system-actor-granted': {
|
|
116
|
+
why: "Under relationships, the application acts on its own behalf as a system actor: a scheduled job, an integration handler, a process, an event handler that sends a command. The actor `system:<name>` is a subject of type `system`, and nothing is permitted to it until a relationship says so; the command it sends is refused with FORBIDDEN when the application runs, and a spec on a fake authorizer never shows it. `generate job` writes the relationship for a job; a handler written by hand needs its line in `systemRelationships` of `<platformDir>/auth/relationships/relate-system-actors.ts`. Judged: every `systemActor(<name>)` of a context outside the tests, with a name the checker reads (a string literal, or `<Class>.name` of a class of the same file), in a file that sends at least one command or query not declared public (`@Public()`, `.public()`, `publicUseCase(..)`): the files of `auth/relationships/` must name the subject `system:system:<name>` (the authorizer reads an actor as `<type>:<id>`, and the id of a system actor is `system:<name>`; a grant written `system:<name>` never matches). Not judged: a name the checker cannot read, a file that sends no message, and a project whose rights are roles or attributes, where the right is the permission of a role or a rule shared by system actors rather than a relationship per actor. Silent without `relate-system-actors.ts`, and with an authorizer of the project's own (`createAuthorizer` imports a `*Authorizer` of the project), which may let a system actor operate its context. An error: the refusal is certain at run time with the standard authorizer.",
|
|
117
|
+
bad: `// application/event-handlers/open-portfolio-for-advisor.event-handler.ts
|
|
118
|
+
await this.commands.execute(new OpenPortfolioCommand(systemActor(OpenPortfolioForAdvisorEventHandler.name), branchId));
|
|
119
|
+
// platform/auth/relationships/relate-system-actors.ts
|
|
120
|
+
const systemRelationships: readonly RelationTuple[] = [];`,
|
|
121
|
+
good: `// platform/auth/relationships/relate-system-actors.ts
|
|
122
|
+
const systemRelationships: readonly RelationTuple[] = [
|
|
123
|
+
{ object: 'context:branch-network', relation: 'operator', subject: 'system:system:OpenPortfolioForAdvisorEventHandler' },
|
|
124
|
+
];`,
|
|
125
|
+
},
|
|
115
126
|
};
|
|
116
127
|
//# sourceMappingURL=authz-docs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-docs.js","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,gBAAgB,EAAE;QAChB,GAAG,EAAE,mvBAAmvB;QACxvB,GAAG,EAAE;;;mEAG0D;QAC/D,IAAI,EAAE;;;;;mEAKyD;KAChE;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,q0BAAq0B;QAC10B,GAAG,EAAE;;;;;4DAKmD;QACxD,IAAI,EAAE;;;;;;sCAM4B;KACnC;IACD,eAAe,EAAE;QACf,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"authz-docs.js","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,gBAAgB,EAAE;QAChB,GAAG,EAAE,mvBAAmvB;QACxvB,GAAG,EAAE;;;mEAG0D;QAC/D,IAAI,EAAE;;;;;mEAKyD;KAChE;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,q0BAAq0B;QAC10B,GAAG,EAAE;;;;;4DAKmD;QACxD,IAAI,EAAE;;;;;;sCAM4B;KACnC;IACD,eAAe,EAAE;QACf,GAAG,EAAE,mlFAAmlF;QACxlF,GAAG,EAAE;;;;;8CAKqC;QAC1C,IAAI,EAAE;;;;;kFAKwE;KAC/E;IACD,qBAAqB,EAAE;QACrB,GAAG,EAAE,uxDAAuxD;QAC5xD,GAAG,EAAE;;;oGAG2F;QAChG,IAAI,EAAE;;;;;wGAK8F;KACrG;IACD,yBAAyB,EAAE;QACzB,GAAG,EAAE,u6CAAu6C;QAC56C,GAAG,EAAE;;;;;;qEAM4D;QACjE,IAAI,EAAE;;;;;;EAMR;KACC;IACD,oBAAoB,EAAE;QACpB,GAAG,EAAE,o/BAAo/B;QACz/B,GAAG,EAAE;;;;;gCAKuB;QAC5B,IAAI,EAAE;;;gCAGsB;KAC7B;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,ykBAAykB;QAC9kB,GAAG,EAAE;;;;qDAI4C;QACjD,IAAI,EAAE;;;;;2GAKiG;KACxG;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,i1BAAi1B;QACt1B,GAAG,EAAE;;+FAEsF;QAC3F,IAAI,EAAE;;;;;IAKN;KACD;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,+kDAA+kD;QACplD,GAAG,EAAE;;;0DAGiD;QACtD,IAAI,EAAE;;;GAGP;KACA;CACF,CAAC"}
|
|
@@ -33,7 +33,7 @@ constructor(private readonly publisher: IntegrationEventPublisher) {}
|
|
|
33
33
|
eventPublisher: new OutboxPublisher(persistence.outbox),`,
|
|
34
34
|
},
|
|
35
35
|
'events/consumer-idempotent': {
|
|
36
|
-
why:
|
|
36
|
+
why: "Delivery is at least once: a consumer sees the same event again after a retry, a restart or a replay. The processed-event store recognises a redelivery by the pair consumer name and event id, in the transaction of the handler. A consumer without a name, or sharing the name of another, either handles events twice or skips events it never handled. An integration event handler class that carries @IntegrationEventHandler(definition, { consumer }) is named by its declaration and needs no registration; the name is a string literal, and it is unique across declarations and registrations alike. Options that spread a shared object ({ ...options, consumer: 'ctx.name' }) are accepted when the file shows that object carrying `processed`: a `const` initialised with an object literal, or a value typed `ConsumeOptions`; a spread whose content is not in the file is refused.",
|
|
37
37
|
bad: `// billing.module.ts
|
|
38
38
|
subscriber.subscribe('catalog.product.listed', (event) => productListedHandler.handle(event));
|
|
39
39
|
// application/integration/handlers/product-listed.integration-handler.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-docs.js","sourceRoot":"","sources":["../../../src/check/explain/events-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,2LAA2L;QAChM,GAAG,EAAE,8CAA8C;QACnD,IAAI,EAAE,uDAAuD;KAC9D;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,8dAA8d;QACne,GAAG,EAAE;;EAEP;QACE,IAAI,EAAE;EACR;KACC;IACD,sCAAsC,EAAE;QACtC,GAAG,EAAE,2UAA2U;QAChV,GAAG,EAAE;uEAC8D;QACnE,IAAI,EAAE;;;IAGN;KACD;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,wVAAwV;QAC7V,GAAG,EAAE;;;qDAG4C;QACjD,IAAI,EAAE;;;yDAG+C;KACtD;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"events-docs.js","sourceRoot":"","sources":["../../../src/check/explain/events-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,2LAA2L;QAChM,GAAG,EAAE,8CAA8C;QACnD,IAAI,EAAE,uDAAuD;KAC9D;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,8dAA8d;QACne,GAAG,EAAE;;EAEP;QACE,IAAI,EAAE;EACR;KACC;IACD,sCAAsC,EAAE;QACtC,GAAG,EAAE,2UAA2U;QAChV,GAAG,EAAE;uEAC8D;QACnE,IAAI,EAAE;;;IAGN;KACD;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,wVAAwV;QAC7V,GAAG,EAAE;;;qDAG4C;QACjD,IAAI,EAAE;;;yDAG+C;KACtD;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,w2BAAw2B;QAC72B,GAAG,EAAE;;;uEAG8D;QACnE,IAAI,EAAE;;;;;;;;EAQR;KACC;IACD,kCAAkC,EAAE;QAClC,GAAG,EAAE,svBAAsvB;QAC3vB,GAAG,EAAE;;;;sDAI6C;QAClD,IAAI,EAAE;;;;;qCAK2B;KAClC;IACD,2CAA2C,EAAE;QAC3C,GAAG,EAAE,uxDAAuxD;QAC5xD,GAAG,EAAE;;;;;;;;;;sFAU6E;QAClF,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBR;KACC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduling-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/scheduling-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"scheduling-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/scheduling-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqE7D,CAAC"}
|
|
@@ -45,5 +45,27 @@ export class SendRemindersJob implements ScheduledJob {}`,
|
|
|
45
45
|
good: `@Scheduled('billing.send-reminders', { every: '15m', tenancy: 'per-tenant' })
|
|
46
46
|
export class SendRemindersJob implements ScheduledJob {}`,
|
|
47
47
|
},
|
|
48
|
+
'scheduling/job-registered': {
|
|
49
|
+
why: 'The scheduler runs the jobs the module files register, and nothing else. A class in `application/scheduling/*.job.ts` or `application/background/*.background-job.ts` that no registration names is dead code: its spec passes, every other rule passes, and the job never runs. Judged on the exported class of each of those files: in the explicit style another file outside the tests names it in `.handledBy(..)`, in `.register(..)` (`platform.jobs.register`, `platform.backgroundJobs.register`) or builds it with `new`; the declared style registers a class by its decorator, which `declarations/role-declared` requires, and is not judged here. A registration made by a loop or a list the checker does not read is reported as well: write the plain form. `generate job` and `generate background-job` write the registration; a class written by hand needs it. An error from the first day.',
|
|
50
|
+
bad: `// application/scheduling/check-registration.job.ts
|
|
51
|
+
export class CheckRegistrationJob implements ScheduledJob {}
|
|
52
|
+
// brokerage.module.ts
|
|
53
|
+
function registerJobs(platform: Platform): void {
|
|
54
|
+
// ddd-ts-kit:jobs
|
|
55
|
+
// /ddd-ts-kit:jobs
|
|
56
|
+
}`,
|
|
57
|
+
good: `// brokerage.module.ts
|
|
58
|
+
function registerJobs(platform: Platform): void {
|
|
59
|
+
// ddd-ts-kit:jobs
|
|
60
|
+
const checkRegistrationJob = new CheckRegistrationJob(platform.commands);
|
|
61
|
+
|
|
62
|
+
platform.jobs.register({
|
|
63
|
+
name: 'brokerage.check-registration',
|
|
64
|
+
schedule: { cron: '0 6 * * *', timeZone: 'Europe/Paris' },
|
|
65
|
+
run: (execution) => checkRegistrationJob.run(execution),
|
|
66
|
+
});
|
|
67
|
+
// /ddd-ts-kit:jobs
|
|
68
|
+
}`,
|
|
69
|
+
},
|
|
48
70
|
};
|
|
49
71
|
//# sourceMappingURL=scheduling-docs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduling-docs.js","sourceRoot":"","sources":["../../../src/check/explain/scheduling-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAsC;IAChE,kCAAkC,EAAE;QAClC,GAAG,EAAE,2dAA2d;QAChe,GAAG,EAAE;;;;;;;;;;;;;;;EAeP;QACE,IAAI,EAAE;;;;;;;;EAQR;KACC;IACD,qBAAqB,EAAE;QACrB,GAAG,EAAE,+fAA+f;QACpgB,GAAG,EAAE;;;;mFAI0E;QAC/E,IAAI,EAAE;;wFAE8E;KACrF;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,q6BAAq6B;QAC16B,GAAG,EAAE;yDACgD;QACrD,IAAI,EAAE;yDAC+C;KACtD;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"scheduling-docs.js","sourceRoot":"","sources":["../../../src/check/explain/scheduling-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAsC;IAChE,kCAAkC,EAAE;QAClC,GAAG,EAAE,2dAA2d;QAChe,GAAG,EAAE;;;;;;;;;;;;;;;EAeP;QACE,IAAI,EAAE;;;;;;;;EAQR;KACC;IACD,qBAAqB,EAAE;QACrB,GAAG,EAAE,+fAA+f;QACpgB,GAAG,EAAE;;;;mFAI0E;QAC/E,IAAI,EAAE;;wFAE8E;KACrF;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,q6BAAq6B;QAC16B,GAAG,EAAE;yDACgD;QACrD,IAAI,EAAE;yDAC+C;KACtD;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,k3BAAk3B;QACv3B,GAAG,EAAE;;;;;;EAMP;QACE,IAAI,EAAE;;;;;;;;;;;EAWR;KACC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/tree-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"tree-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/tree-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgIvD,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export const TREE_DOCS = {
|
|
2
2
|
'tree/closed': {
|
|
3
|
-
why: 'A fixed tree means every concept has one obvious place, so people and tools find it without reading the code. An ad hoc folder (utils, helpers, common, types, functions) is where unnamed concepts go to hide: a function that reads a value is a method of that value object, a decision over several objects a domain service, a shared shape of data a value object, an interchangeable rule an abstract class of domain/services with one service per variant (docs/ARCHITECTURE.md, a concept with no role of its own). A real new need is declared in extraDirectories with its reason. In the declared style the generated summary <context>.declarations.ts lives at the root of the context, next to CONTEXT.md, and the generated <layer>.declarations.ts of each layer in that layer; a module file may stay at the root when the wiring of a context is unusual. The tree is read as git sees it: what git ignores, and a dot-directory of a context such as the .claude/ a sandbox leaves behind, are not part of it.',
|
|
3
|
+
why: 'A fixed tree means every concept has one obvious place, so people and tools find it without reading the code. An ad hoc folder (utils, helpers, common, types, functions) is where unnamed concepts go to hide: a function that reads a value is a method of that value object, a decision over several objects a domain service, a shared shape of data a value object, an interchangeable rule an abstract class of domain/services with one service per variant (docs/ARCHITECTURE.md, a concept with no role of its own). A real new need is declared in extraDirectories with its reason. In the declared style the generated summary <context>.declarations.ts lives at the root of the context, next to CONTEXT.md, and the generated <layer>.declarations.ts of each layer in that layer; a module file may stay at the root when the wiring of a context is unusual. A context divided into modules of its model keeps one more place in the explicit style: <module>/<module>.module.ts, at the root of the folder of each module, registers what the module holds (its handlers, consumers, reactions, jobs and routes) and is composed by <context>.module.ts, which then stays small; nothing else sits at the root of a module. The tree is read as git sees it: what git ignores, and a dot-directory of a context such as the .claude/ a sandbox leaves behind, are not part of it.',
|
|
4
4
|
bad: `contexts/billing/domain/utils/rounding.ts`,
|
|
5
5
|
good: `contexts/billing/domain/value-objects/money.vo.ts
|
|
6
6
|
contexts/billing/billing.declarations.ts // declared style only
|
|
7
|
-
contexts/billing/application/application.declarations.ts // declared style only
|
|
7
|
+
contexts/billing/application/application.declarations.ts // declared style only
|
|
8
|
+
contexts/billing/invoices/invoices.module.ts // explicit style, a module of the model`,
|
|
8
9
|
},
|
|
9
10
|
'tree/context-doc': {
|
|
10
11
|
why: 'CONTEXT.md is where the vocabulary and the boundaries are agreed with the domain experts. Without it, names drift and nobody can tell whether a concept belongs here. The classification says how much design effort the context deserves.',
|
|
@@ -81,8 +82,10 @@ coverage: { provider: 'v8', reporter: ['text', 'cobertura', 'lcov'], ...governed
|
|
|
81
82
|
// ddd-ts-kit.config.json
|
|
82
83
|
"coverage": { "infrastructure": { "branches": 50 } },
|
|
83
84
|
"deviations": [{ "what": "coverage.infrastructure.branches", "adr": "0011", "reason": "The driver's failure branches are held by its contract suite." }]
|
|
84
|
-
// domain/aggregates/invoice.aggregate.ts
|
|
85
|
-
/* v8 ignore next 3 -- ADR-0012: reached only by the legacy import, removed with it
|
|
85
|
+
// domain/aggregates/invoice.aggregate.ts, under Vitest, whose v8 provider reads v8 hints only
|
|
86
|
+
/* v8 ignore next 3 -- ADR-0012: reached only by the legacy import, removed with it */
|
|
87
|
+
// the same under Jest, whose babel provider reads istanbul hints only
|
|
88
|
+
/* istanbul ignore next -- ADR-0012: reached only by the legacy import, removed with it */`,
|
|
86
89
|
},
|
|
87
90
|
'test/mutation-governed': {
|
|
88
91
|
why: 'A mutation score says how many of the changes made to the domain and the application its tests would notice, and it only says so while the measure is honest. One source holds it: the "mutation" key of ddd-ts-kit.config.json gives the floor of each layer every context must reach, the domain and the application (80 and 75 when the key is absent), and the Stryker config reads it through governedMutation of @ddd-ts-kit/testing/mutation, which also mutates the domain and application layers of every context, the texts of their refusals left out through the ignorer of the kit, since a refusal is asserted by its code and never by its text, every other string measured. Raising the floor is free; lowering it is a deviation with its decision record (governance/recorded-deviation). What this rule refuses is the quiet way around: a mutate, mutator, ignorers, ignoreStatic or thresholds written by hand in the Stryker config, or a config that does not read the kit at all. A survivor is a rule no test states: it is read as a decision, then tested or left alive and said so, never hidden by the configuration.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-docs.js","sourceRoot":"","sources":["../../../src/check/explain/tree-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAsC;IAC1D,aAAa,EAAE;QACb,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"tree-docs.js","sourceRoot":"","sources":["../../../src/check/explain/tree-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAsC;IAC1D,aAAa,EAAE;QACb,GAAG,EAAE,q0CAAq0C;QAC10C,GAAG,EAAE,2CAA2C;QAChD,IAAI,EAAE;;;2GAGiG;KACxG;IACD,kBAAkB,EAAE;QAClB,GAAG,EAAE,4OAA4O;QACjP,GAAG,EAAE,6GAA6G;QAClH,IAAI,EAAE,6GAA6G;KACpH;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,g9BAAg9B;QACr9B,GAAG,EAAE,iHAAiH;QACtH,IAAI,EAAE,2HAA2H;KAClI;IACD,eAAe,EAAE;QACf,GAAG,EAAE,y3BAAy3B;QAC93B,GAAG,EAAE,8BAA8B;QACnC,IAAI,EAAE;;;;qEAI2D;KAClE;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,kyBAAkyB;QACvyB,GAAG,EAAE;;;;kCAIyB;QAC9B,IAAI,EAAE;;;;;oCAK0B;KACjC;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,svCAAsvC;QAC3vC,GAAG,EAAE;;;EAGP;QACE,IAAI,EAAE;;;EAGR;KACC;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,kYAAkY;QACvY,GAAG,EAAE;;;;;;;2CAOkC;QACvC,IAAI,EAAE;;;4BAGkB;KACzB;IACD,oBAAoB,EAAE;QACpB,GAAG,EAAE,kaAAka;QACva,GAAG,EAAE,kFAAkF;QACvF,IAAI,EAAE,qCAAqC;KAC5C;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,y9BAAy9B;QAC99B,GAAG,EAAE;;;uBAGc;QACnB,IAAI,EAAE;;;;;;;;2FAQiF;KACxF;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,qlCAAqlC;QAC1lC,GAAG,EAAE;gHACuG;QAC5G,IAAI,EAAE;;;;;qHAK2G;KAClH;IACD,eAAe,EAAE;QACf,GAAG,EAAE,4SAA4S;QACjT,GAAG,EAAE;gDACuC;QAC5C,IAAI,EAAE;qDAC2C;KAClD;IACD,uBAAuB,EAAE;QACvB,GAAG,EAAE,gUAAgU;QACrU,GAAG,EAAE,iFAAiF;QACtF,IAAI,EAAE;8BACoB;KAC3B;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,uvBAAuvB;QAC5vB,GAAG,EAAE;qFAC4E;QACjF,IAAI,EAAE;;;KAGL;KACF;IACD,oBAAoB,EAAE;QACpB,GAAG,EAAE,yqBAAyqB;QAC9qB,GAAG,EAAE,yEAAyE;QAC9E,IAAI,EAAE;qFAC2E;KAClF;CACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const WIRING_DOCS = {
|
|
2
2
|
'composition/only-in-module': {
|
|
3
|
-
why: 'When adapters are created in one place, replacing one (a fake in a test, another provider in production) is a one-line change and tracing can wrap them all. A `new PgRepository()` buried in a handler, or a `bind(Port).toClass(PgRepository)` written outside the composition root, hides a dependency and defeats both. A class carrying @Repository, @Gateway or @Adapter is bound by its declaration, so nothing instantiates it at all. What turns declarations into bindings (contextModule, discoverContext, include on a module builder) is composition too and stays in main.ts, apps/<context>/main.ts, the platform and a module file.',
|
|
3
|
+
why: 'When adapters are created in one place, replacing one (a fake in a test, another provider in production) is a one-line change and tracing can wrap them all. A `new PgRepository()` buried in a handler, or a `bind(Port).toClass(PgRepository)` written outside the composition root, hides a dependency and defeats both. A class carrying @Repository, @Gateway or @Adapter is bound by its declaration, so nothing instantiates it at all. What turns declarations into bindings (contextModule, discoverContext, include on a module builder) is composition too and stays in main.ts, apps/<context>/main.ts, the platform and a module file: <context>.module.ts, or, in a context divided into modules of its model, the <module>/<module>.module.ts it composes.',
|
|
4
4
|
bad: `// application/commands/issue-invoice/issue-invoice.handler.ts
|
|
5
5
|
const repository = new PgInvoiceRepository();
|
|
6
6
|
// infrastructure/external/extend-billing.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring-docs.js","sourceRoot":"","sources":["../../../src/check/explain/wiring-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,4BAA4B,EAAE;QAC5B,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"wiring-docs.js","sourceRoot":"","sources":["../../../src/check/explain/wiring-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,4BAA4B,EAAE;QAC5B,GAAG,EAAE,2uBAA2uB;QAChvB,GAAG,EAAE;;;sCAG6B;QAClC,IAAI,EAAE;;;;;;+CAMqC;KAC5C;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,irBAAirB;QACtrB,GAAG,EAAE;;;;;;wBAMe;QACpB,IAAI,EAAE;;;;;0CAKgC;KACvC;IACD,6BAA6B,EAAE;QAC7B,GAAG,EAAE,yqDAAyqD;QAC9qD,GAAG,EAAE;;;;;;;6FAOoF;QACzF,IAAI,EAAE;;;;;;;;;;;;;;+EAcqE;KAC5E;IACD,oCAAoC,EAAE;QACpC,GAAG,EAAE,omCAAomC;QACzmC,GAAG,EAAE;;;;;;;;;iEASwD;QAC7D,IAAI,EAAE;;;;;;;EAOR;KACC;IACD,iCAAiC,EAAE;QACjC,GAAG,EAAE,o8BAAo8B;QACz8B,GAAG,EAAE;+DACsD;QAC3D,IAAI,EAAE;;;;;;;+DAOqD;KAC5D;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,+bAA+b;QACpc,GAAG,EAAE;yIACgI;QACrI,IAAI,EAAE;yIAC+H;KACtI;IACD,cAAc,EAAE;QACd,GAAG,EAAE,kXAAkX;QACvX,GAAG,EAAE;;uEAE8D;QACnE,IAAI,EAAE;;2IAEiI;KACxI;IACD,iCAAiC,EAAE;QACjC,GAAG,EAAE,qMAAqM;QAC1M,GAAG,EAAE,qDAAqD;QAC1D,IAAI,EAAE,qGAAqG;KAC5G;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-granted-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-granted-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"authz-granted-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-granted-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4CzC,eAAO,MAAM,sBAAsB,EAAE,SAAS,OAAO,EAgHpD,CAAC"}
|
|
@@ -11,6 +11,13 @@ const SIGNED_IN = 'src/platform/auth/authorization/signed-in-grants.ts';
|
|
|
11
11
|
const DECLARED = source("import { definePermissions } from '@ddd-ts-kit/auth';", '', "export const billingPermissions = definePermissions('billing', {", " 'invoice.issue': { description: 'Issue invoice' },", '});');
|
|
12
12
|
const ROLE_VOCABULARY = source('export const Role = {', " Admin: 'admin',", " Accountant: 'accountant',", '} as const;', '', 'export type Role = (typeof Role)[keyof typeof Role];');
|
|
13
13
|
const rule = 'authz/granted';
|
|
14
|
+
const OWN_AUTHORIZER = {
|
|
15
|
+
'src/platform/auth/authorization/create-authorizer.ts': source("import { MyAuthorizer } from '@/platform/auth/authorization/my.authorizer.js';", '', 'export const createAuthorizer = () => new MyAuthorizer();'),
|
|
16
|
+
'src/platform/auth/authorization/my.authorizer.ts': 'export class MyAuthorizer {}\n',
|
|
17
|
+
};
|
|
18
|
+
const SCHEMA = 'src/platform/auth/relationships/relationship-schema.ts';
|
|
19
|
+
const RELATE_OPERATORS = 'src/platform/auth/relationships/relate-operators.ts';
|
|
20
|
+
const REBAC = { [CONFIG_FILE]: config({ stack: { authz: 'rebac' } }) };
|
|
14
21
|
export const AUTHZ_GRANTED_FIXTURES = [
|
|
15
22
|
{
|
|
16
23
|
ruleId: rule,
|
|
@@ -60,7 +67,69 @@ export const AUTHZ_GRANTED_FIXTURES = [
|
|
|
60
67
|
expect: { file: PERMISSIONS },
|
|
61
68
|
files: granting("// [Role.Accountant]: [billingPermissions['invoice.issue']],"),
|
|
62
69
|
},
|
|
70
|
+
{
|
|
71
|
+
ruleId: rule,
|
|
72
|
+
name: 'relationships: a permission held on the context, an operator of the context written by a source',
|
|
73
|
+
expect: 'pass',
|
|
74
|
+
files: relating(operatorOf("'context:billing'", "'user:ada'")),
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
ruleId: rule,
|
|
78
|
+
name: 'relationships: a permission every signed-in person holds',
|
|
79
|
+
expect: 'pass',
|
|
80
|
+
files: {
|
|
81
|
+
...relating(),
|
|
82
|
+
[SIGNED_IN]: source('export const signedInGrants: readonly string[] = [', ' // ddd-ts-kit:signed-in-grants', " 'billing:*',", ' // /ddd-ts-kit:signed-in-grants', '];'),
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
ruleId: rule,
|
|
87
|
+
name: 'relationships: a permission derived on an element, held through relations written at run time',
|
|
88
|
+
expect: 'pass',
|
|
89
|
+
files: relating(undefined, "[billingPermissions['invoice.issue'].id]: 'owner'"),
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
ruleId: rule,
|
|
93
|
+
name: 'relationships: an operator written for a context the checker cannot read',
|
|
94
|
+
expect: 'pass',
|
|
95
|
+
files: relating(operatorOf('`context:${context}`', "'user:ada'")),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
ruleId: rule,
|
|
99
|
+
name: 'relationships: no operator written anywhere, the operators are provisioned out of the tree',
|
|
100
|
+
expect: 'pass',
|
|
101
|
+
files: relating(),
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
ruleId: rule,
|
|
105
|
+
name: 'relationships: operators are written for another context, none for the context of the permission',
|
|
106
|
+
expect: { file: PERMISSIONS },
|
|
107
|
+
files: relating(operatorOf("'context:catalog'", "'user:ada'")),
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
ruleId: rule,
|
|
111
|
+
name: 'relationships: a permission only a system actor holds, operator of the context',
|
|
112
|
+
expect: 'pass',
|
|
113
|
+
files: relating(operatorOf("'context:billing'", "'system:system:billing.send-reminders'")),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
ruleId: rule,
|
|
117
|
+
name: 'relationships: an authorizer of the project, which may grant what the schema does not',
|
|
118
|
+
expect: 'pass',
|
|
119
|
+
files: { ...relating(), ...OWN_AUTHORIZER },
|
|
120
|
+
},
|
|
63
121
|
];
|
|
122
|
+
/** A project whose rights are relationships, the schema of `init` deriving on the context what no element derives. */
|
|
123
|
+
function relating(operators, element = '') {
|
|
124
|
+
return project({
|
|
125
|
+
[PERMISSIONS]: DECLARED,
|
|
126
|
+
[SCHEMA]: source("import { defineSchema, type SchemaDefinition } from '@ddd-ts-kit/auth/rebac';", "import { permissions } from '@/platform/auth/authorization/permissions.js';", '', `const elements: SchemaDefinition = { invoice: { relations: { owner: ['user'] }, derived: { ${element} } } };`, '', 'const modelledOnAnElement = new Set(Object.values(elements).flatMap((element) => Object.keys(element.derived ?? {})));', '', 'export const relationshipSchema = defineSchema({', ' user: {},', ' system: {},', ' context: {', " relations: { operator: ['user', 'system'] },", " derived: Object.fromEntries(permissions.all().filter((permission) => !modelledOnAnElement.has(permission.id)).map((permission) => [permission.id, 'operator'])),", ' },', ' ...elements,', '});'),
|
|
127
|
+
...(operators === undefined ? {} : { [RELATE_OPERATORS]: operators }),
|
|
128
|
+
}, REBAC);
|
|
129
|
+
}
|
|
130
|
+
function operatorOf(object, subject) {
|
|
131
|
+
return source("import type { RelationTuple } from '@ddd-ts-kit/auth/rebac';", '', 'const context = "billing";', 'export const operators: readonly RelationTuple[] = [', ` { object: ${object}, relation: 'operator', subject: ${subject} },`, '];');
|
|
132
|
+
}
|
|
64
133
|
function granting(...grants) {
|
|
65
134
|
return project({ [PERMISSIONS]: DECLARED, [ROLE]: ROLE_VOCABULARY, [ROLES]: roles(...grants) });
|
|
66
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-granted-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-granted-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAC1B,MAAM,WAAW,GAAG,GAAG,OAAO,yBAAyB,CAAC;AACxD,MAAM,KAAK,GAAG,kCAAkC,CAAC;AACjD,MAAM,IAAI,GAAG,yCAAyC,CAAC;AACvD,MAAM,SAAS,GAAG,qDAAqD,CAAC;AAExE,MAAM,QAAQ,GAAG,MAAM,CACrB,uDAAuD,EACvD,EAAE,EACF,kEAAkE,EAClE,sDAAsD,EACtD,KAAK,CACN,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAC5B,uBAAuB,EACvB,mBAAmB,EACnB,6BAA6B,EAC7B,aAAa,EACb,EAAE,EACF,sDAAsD,CACvD,CAAC;A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F;CACF,CAAC;AAEF,SAAS,QAAQ,CAAC,GAAG,MAAyB;IAC5C,OAAO,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAClG,CAAC;AAED,4FAA4F;AAC5F,SAAS,KAAK,CAAC,GAAG,MAAyB;IACzC,OAAO,MAAM,CACX,gDAAgD,EAChD,iFAAiF,EACjF,+DAA+D,EAC/D,EAAE,EACF,oEAAoE,EACpE,wBAAwB,EACxB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,EACtC,IAAI,EACJ,EAAE,EACF,4CAA4C,CAC7C,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"authz-granted-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-granted-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAC1B,MAAM,WAAW,GAAG,GAAG,OAAO,yBAAyB,CAAC;AACxD,MAAM,KAAK,GAAG,kCAAkC,CAAC;AACjD,MAAM,IAAI,GAAG,yCAAyC,CAAC;AACvD,MAAM,SAAS,GAAG,qDAAqD,CAAC;AAExE,MAAM,QAAQ,GAAG,MAAM,CACrB,uDAAuD,EACvD,EAAE,EACF,kEAAkE,EAClE,sDAAsD,EACtD,KAAK,CACN,CAAC;AAEF,MAAM,eAA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sD,EACtD,eAAe,MAAM,oCAAoC,OAAO,KAAK,EACrE,IAAI,CACL,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,GAAG,MAAyB;IAC5C,OAAO,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,eAAe,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAClG,CAAC;AAED,4FAA4F;AAC5F,SAAS,KAAK,CAAC,GAAG,MAAyB;IACzC,OAAO,MAAM,CACX,gDAAgD,EAChD,iFAAiF,EACjF,+DAA+D,EAC/D,EAAE,EACF,oEAAoE,EACpE,wBAAwB,EACxB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,EACtC,IAAI,EACJ,EAAE,EACF,4CAA4C,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-resource-modelled-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-resource-modelled-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"authz-resource-modelled-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-resource-modelled-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+CzC,eAAO,MAAM,gCAAgC,EAAE,SAAS,OAAO,EA8J9D,CAAC"}
|
|
@@ -7,6 +7,9 @@ import { source } from './source.js';
|
|
|
7
7
|
const { BILLING, COMMAND, QUERY, QUERY_HANDLER, QUERY_HANDLER_SPEC } = PATHS;
|
|
8
8
|
const PERMISSIONS = `${BILLING}/billing.permissions.ts`;
|
|
9
9
|
const SCHEMA = 'src/platform/auth/relationships/relationship-schema.ts';
|
|
10
|
+
const OPERATORS = {
|
|
11
|
+
'src/platform/auth/relationships/relate-operators.ts': "export const operators = [{ object: 'context:billing', relation: 'operator', subject: 'user:ada' }];\n",
|
|
12
|
+
};
|
|
10
13
|
const REBAC = { [CONFIG_FILE]: config({ stack: { authz: 'rebac' } }) };
|
|
11
14
|
const DECLARED = source("import { definePermissions } from '@ddd-ts-kit/auth';", '', "export const billingPermissions = definePermissions('billing', {", " 'invoice.issue': { description: 'Issue invoice' },", " 'invoice.search': { description: 'Search invoice' },", '});');
|
|
12
15
|
const SEARCH_HANDLER = source("import type { Access } from '@ddd-ts-kit/auth';", "import { billingPermissions } from '@/contexts/billing/billing.permissions.js';", "import type { InvoicesIssuedQuery } from '@/contexts/billing/application/queries/invoices-issued/invoices-issued.query.js';", '', 'export class InvoicesIssuedHandler {', ' constructor(private readonly access: Access) {}', '', ' async execute(query: InvoicesIssuedQuery): Promise<unknown> {', " return this.access.scope(query.actor, billingPermissions['invoice.search'], 'invoice');", ' }', '}');
|
|
@@ -174,6 +177,7 @@ function inline(derived) {
|
|
|
174
177
|
}
|
|
175
178
|
function requiring(resource, schema, { context, overrides = {}, permission = ISSUE, } = {}) {
|
|
176
179
|
return project({
|
|
180
|
+
...OPERATORS,
|
|
177
181
|
[PERMISSIONS]: DECLARED,
|
|
178
182
|
[SCHEMA]: context === undefined
|
|
179
183
|
? schema
|
|
@@ -184,6 +188,7 @@ function requiring(resource, schema, { context, overrides = {}, permission = ISS
|
|
|
184
188
|
/** A search gated on the context and narrowed by the same permission, which the schema derives on the invoice. */
|
|
185
189
|
function searching(context = "context: { relations: { operator: ['user'] } }") {
|
|
186
190
|
return project({
|
|
191
|
+
...OPERATORS,
|
|
187
192
|
[PERMISSIONS]: DECLARED,
|
|
188
193
|
[SCHEMA]: elements("[billingPermissions['invoice.search'].id]: 'owner'").replace("context: { relations: { operator: ['user'] } }", context),
|
|
189
194
|
[QUERY]: source("import { AuthorizedQuery } from '@ddd-ts-kit/kernel';", "import { Requires } from '@ddd-ts-kit/kernel/declarations';", "import { billingPermissions } from '@/contexts/billing/billing.permissions.js';", '', `@Requires(billingPermissions['invoice.search'], { ${ON_THE_CONTEXT} })`, 'export class InvoicesIssuedQuery extends AuthorizedQuery<unknown> {}'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-resource-modelled-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-resource-modelled-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;AAC7E,MAAM,WAAW,GAAG,GAAG,OAAO,yBAAyB,CAAC;AACxD,MAAM,MAAM,GAAG,wDAAwD,CAAC;
|
|
1
|
+
{"version":3,"file":"authz-resource-modelled-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-resource-modelled-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,OAAO,EAAE,OAAO,EAA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AG,KAAK,GACnB,GAAmF,EAAE;IAEtF,OAAO,OAAO,CACZ;QACE,GAAG,SAAS;QACZ,CAAC,WAAW,CAAC,EAAE,QAAQ;QACvB,CAAC,MAAM,CAAC,EACN,OAAO,KAAK,SAAS;YACnB,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,MAAM,CAAC,OAAO,CACZ,gDAAgD,EAChD,4DAA4D,OAAO,MAAM,CAC1E;QACP,CAAC,OAAO,CAAC,EAAE,MAAM,CACf,yDAAyD,EACzD,6DAA6D,EAC7D,iFAAiF,EACjF,EAAE,EACF,aAAa,UAAU,OAAO,QAAQ,KAAK,EAC3C,qEAAqE,CACtE;KACF,EACD,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,SAAS,EAAE,CAAC,EAAE,CACvE,CAAC;AACJ,CAAC;AAED,kHAAkH;AAClH,SAAS,SAAS,CAAC,OAAO,GAAG,gDAAgD;IAC3E,OAAO,OAAO,CACZ;QACE,GAAG,SAAS;QACZ,CAAC,WAAW,CAAC,EAAE,QAAQ;QACvB,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,oDAAoD,CAAC,CAAC,OAAO,CAC9E,gDAAgD,EAChD,OAAO,CACR;QACD,CAAC,KAAK,CAAC,EAAE,MAAM,CACb,uDAAuD,EACvD,6DAA6D,EAC7D,iFAAiF,EACjF,EAAE,EACF,qDAAqD,cAAc,KAAK,EACxE,sEAAsE,CACvE;QACD,CAAC,aAAa,CAAC,EAAE,cAAc;QAC/B,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC,IAAI;KACnC,EACD,KAAK,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authz-system-actor-granted-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-system-actor-granted-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAczC,eAAO,MAAM,mCAAmC,EAAE,SAAS,OAAO,EAwEjE,CAAC"}
|