ddd-ts-kit 0.83.4 → 0.84.1
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 +16 -0
- package/README.fr.md +28 -25
- package/README.md +27 -24
- package/dist/check/authz/is-in-project.d.ts +4 -0
- package/dist/check/authz/is-in-project.d.ts.map +1 -0
- package/dist/check/authz/is-in-project.js +5 -0
- package/dist/check/authz/is-in-project.js.map +1 -0
- package/dist/check/authz/signed-in-grants.d.ts +1 -1
- package/dist/check/authz/signed-in-grants.d.ts.map +1 -1
- package/dist/check/authz/signed-in-grants.js +4 -2
- package/dist/check/authz/signed-in-grants.js.map +1 -1
- package/dist/check/explain/authz-docs.js +5 -5
- package/dist/check/explain/authz-docs.js.map +1 -1
- package/dist/check/explain/events-docs.js +1 -1
- package/dist/check/explain/standard-docs.js +1 -1
- package/dist/check/fixtures/authz-granted-fixtures.js +4 -4
- package/dist/check/fixtures/authz-granted-fixtures.js.map +1 -1
- package/dist/check/fixtures/authz-scope-narrows-fixtures.js +2 -2
- package/dist/check/fixtures/authz-scope-narrows-fixtures.js.map +1 -1
- package/dist/check/fixtures/paths.d.ts +1 -1
- package/dist/check/fixtures/paths.d.ts.map +1 -1
- package/dist/check/fixtures/paths.js +1 -1
- package/dist/check/fixtures/paths.js.map +1 -1
- package/dist/check/fixtures/tracing-fixtures.js +3 -3
- package/dist/check/fixtures/tracing-fixtures.js.map +1 -1
- package/dist/check/fixtures/tree-fixtures.js +1 -1
- package/dist/check/fixtures/tree-fixtures.js.map +1 -1
- package/dist/check/fixtures/vocabulary-fixtures.js +2 -2
- package/dist/check/fixtures/vocabulary-fixtures.js.map +1 -1
- package/dist/check/rules/authz-granted.d.ts.map +1 -1
- package/dist/check/rules/authz-granted.js +4 -1
- package/dist/check/rules/authz-granted.js.map +1 -1
- package/dist/check/rules/authz-scope-narrows.d.ts.map +1 -1
- package/dist/check/rules/authz-scope-narrows.js +3 -1
- package/dist/check/rules/authz-scope-narrows.js.map +1 -1
- package/dist/check/rules/events-outbox-required.d.ts.map +1 -1
- package/dist/check/rules/events-outbox-required.js +4 -2
- package/dist/check/rules/events-outbox-required.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +3 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +2 -0
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/platform-folders.d.ts +4 -0
- package/dist/commands/platform-folders.d.ts.map +1 -0
- package/dist/commands/platform-folders.js +43 -0
- package/dist/commands/platform-folders.js.map +1 -0
- package/dist/controllers/finish-migration.d.ts.map +1 -1
- package/dist/controllers/finish-migration.js +7 -3
- package/dist/controllers/finish-migration.js.map +1 -1
- package/dist/depcruise/hygiene-rules.js +1 -1
- package/dist/depcruise/hygiene-rules.js.map +1 -1
- package/dist/doctor/diagnose.d.ts +2 -1
- package/dist/doctor/diagnose.d.ts.map +1 -1
- package/dist/doctor/diagnose.js +10 -2
- package/dist/doctor/diagnose.js.map +1 -1
- package/dist/doctor/doctor-finding.d.ts +3 -3
- package/dist/doctor/doctor-finding.d.ts.map +1 -1
- package/dist/doctor/folder-findings.d.ts +5 -0
- package/dist/doctor/folder-findings.d.ts.map +1 -0
- package/dist/doctor/folder-findings.js +19 -0
- package/dist/doctor/folder-findings.js.map +1 -0
- package/dist/doctor/format-diagnosis.js +9 -1
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/script-findings.d.ts +2 -2
- package/dist/doctor/script-findings.d.ts.map +1 -1
- package/dist/doctor/script-findings.js +3 -3
- package/dist/doctor/script-findings.js.map +1 -1
- package/dist/generate/grant-permission.d.ts.map +1 -1
- package/dist/generate/grant-permission.js +3 -2
- package/dist/generate/grant-permission.js.map +1 -1
- package/dist/generate/kinds/gateway-kind.d.ts.map +1 -1
- package/dist/generate/kinds/gateway-kind.js +2 -1
- package/dist/generate/kinds/gateway-kind.js.map +1 -1
- package/dist/generate/kinds/job/grant-system-actor.d.ts.map +1 -1
- package/dist/generate/kinds/job/grant-system-actor.js +5 -6
- package/dist/generate/kinds/job/grant-system-actor.js.map +1 -1
- package/dist/generate/kinds/job-kind.d.ts.map +1 -1
- package/dist/generate/kinds/job-kind.js +2 -1
- package/dist/generate/kinds/job-kind.js.map +1 -1
- package/dist/generate/kinds/plan-vars.d.ts +6 -2
- package/dist/generate/kinds/plan-vars.d.ts.map +1 -1
- package/dist/generate/kinds/plan-vars.js +7 -3
- package/dist/generate/kinds/plan-vars.js.map +1 -1
- package/dist/generate/kinds/policy-kind.d.ts.map +1 -1
- package/dist/generate/kinds/policy-kind.js +2 -1
- package/dist/generate/kinds/policy-kind.js.map +1 -1
- package/dist/generate/kinds/wire-context.d.ts.map +1 -1
- package/dist/generate/kinds/wire-context.js +6 -4
- package/dist/generate/kinds/wire-context.js.map +1 -1
- package/dist/generate/kinds/write-context-files.d.ts.map +1 -1
- package/dist/generate/kinds/write-context-files.js +2 -1
- package/dist/generate/kinds/write-context-files.js.map +1 -1
- package/dist/generate/platform-path.d.ts +5 -0
- package/dist/generate/platform-path.d.ts.map +1 -0
- package/dist/generate/platform-path.js +6 -0
- package/dist/generate/platform-path.js.map +1 -0
- package/dist/generate/shared-writes.js +8 -8
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/generate/vocabulary/declare-role.d.ts +1 -1
- package/dist/generate/vocabulary/declare-role.d.ts.map +1 -1
- package/dist/generate/vocabulary/declare-role.js +3 -2
- package/dist/generate/vocabulary/declare-role.js.map +1 -1
- package/dist/generate/wirings.d.ts.map +1 -1
- package/dist/generate/wirings.js +4 -3
- package/dist/generate/wirings.js.map +1 -1
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +9 -0
- package/dist/help/notes.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +1 -0
- package/dist/help/usage.js.map +1 -1
- package/dist/init/files/audit-files.d.ts.map +1 -1
- package/dist/init/files/audit-files.js +9 -2
- package/dist/init/files/audit-files.js.map +1 -1
- package/dist/init/files/auth-files.d.ts.map +1 -1
- package/dist/init/files/auth-files.js +31 -22
- package/dist/init/files/auth-files.js.map +1 -1
- package/dist/init/files/platform-files.js +10 -6
- package/dist/init/files/platform-files.js.map +1 -1
- package/dist/init/manifest/scripts-for.d.ts +2 -2
- package/dist/init/manifest/scripts-for.d.ts.map +1 -1
- package/dist/init/manifest/scripts-for.js +7 -7
- package/dist/init/manifest/scripts-for.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/manifest/write-manifest.d.ts.map +1 -1
- package/dist/init/manifest/write-manifest.js +3 -1
- package/dist/init/manifest/write-manifest.js.map +1 -1
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +13 -4
- package/dist/init/run-init.js.map +1 -1
- package/dist/platform-folders/flat-files.d.ts +3 -0
- package/dist/platform-folders/flat-files.d.ts.map +1 -0
- package/dist/platform-folders/flat-files.js +4 -0
- package/dist/platform-folders/flat-files.js.map +1 -0
- package/dist/platform-folders/flat-relocation.d.ts +10 -0
- package/dist/platform-folders/flat-relocation.d.ts.map +1 -0
- package/dist/platform-folders/flat-relocation.js +18 -0
- package/dist/platform-folders/flat-relocation.js.map +1 -0
- package/dist/platform-folders/folder-move.d.ts +6 -0
- package/dist/platform-folders/folder-move.d.ts.map +1 -0
- package/dist/platform-folders/folder-move.js +2 -0
- package/dist/platform-folders/folder-move.js.map +1 -0
- package/dist/platform-folders/index.d.ts +6 -0
- package/dist/platform-folders/index.d.ts.map +1 -0
- package/dist/platform-folders/index.js +5 -0
- package/dist/platform-folders/index.js.map +1 -0
- package/dist/platform-folders/keep-flat-platform.d.ts +9 -0
- package/dist/platform-folders/keep-flat-platform.d.ts.map +1 -0
- package/dist/platform-folders/keep-flat-platform.js +14 -0
- package/dist/platform-folders/keep-flat-platform.js.map +1 -0
- package/dist/platform-folders/moved-specifier.d.ts +14 -0
- package/dist/platform-folders/moved-specifier.d.ts.map +1 -0
- package/dist/platform-folders/moved-specifier.js +38 -0
- package/dist/platform-folders/moved-specifier.js.map +1 -0
- package/dist/platform-folders/placements.d.ts +8 -0
- package/dist/platform-folders/placements.d.ts.map +1 -0
- package/dist/platform-folders/placements.js +25 -0
- package/dist/platform-folders/placements.js.map +1 -0
- package/dist/platform-folders/platform-folder-names.d.ts +3 -0
- package/dist/platform-folders/platform-folder-names.d.ts.map +1 -0
- package/dist/platform-folders/platform-folder-names.js +7 -0
- package/dist/platform-folders/platform-folder-names.js.map +1 -0
- package/dist/platform-folders/platform-folders.d.ts +27 -0
- package/dist/platform-folders/platform-folders.d.ts.map +1 -0
- package/dist/platform-folders/platform-folders.js +53 -0
- package/dist/platform-folders/platform-folders.js.map +1 -0
- package/dist/platform-folders/platform-moves.d.ts +9 -0
- package/dist/platform-folders/platform-moves.d.ts.map +1 -0
- package/dist/platform-folders/platform-moves.js +16 -0
- package/dist/platform-folders/platform-moves.js.map +1 -0
- package/dist/platform-folders/unknown-flat-files.d.ts +5 -0
- package/dist/platform-folders/unknown-flat-files.d.ts.map +1 -0
- package/dist/platform-folders/unknown-flat-files.js +14 -0
- package/dist/platform-folders/unknown-flat-files.js.map +1 -0
- package/dist/platform-folders/with-moved-imports.d.ts +7 -0
- package/dist/platform-folders/with-moved-imports.d.ts.map +1 -0
- package/dist/platform-folders/with-moved-imports.js +14 -0
- package/dist/platform-folders/with-moved-imports.js.map +1 -0
- package/dist/platform-layout/index.d.ts +5 -0
- package/dist/platform-layout/index.d.ts.map +1 -0
- package/dist/platform-layout/index.js +4 -0
- package/dist/platform-layout/index.js.map +1 -0
- package/dist/platform-layout/platform-file-in.d.ts +9 -0
- package/dist/platform-layout/platform-file-in.d.ts.map +1 -0
- package/dist/platform-layout/platform-file-in.js +18 -0
- package/dist/platform-layout/platform-file-in.js.map +1 -0
- package/dist/platform-layout/platform-file-paths.d.ts +5 -0
- package/dist/platform-layout/platform-file-paths.d.ts.map +1 -0
- package/dist/platform-layout/platform-file-paths.js +9 -0
- package/dist/platform-layout/platform-file-paths.js.map +1 -0
- package/dist/platform-layout/platform-file.d.ts +6 -0
- package/dist/platform-layout/platform-file.d.ts.map +1 -0
- package/dist/platform-layout/platform-file.js +2 -0
- package/dist/platform-layout/platform-file.js.map +1 -0
- package/dist/platform-layout/platform-layout.d.ts +57 -0
- package/dist/platform-layout/platform-layout.d.ts.map +1 -0
- package/dist/platform-layout/platform-layout.js +61 -0
- package/dist/platform-layout/platform-layout.js.map +1 -0
- package/dist/presets/grant-to-signed-in.d.ts.map +1 -1
- package/dist/presets/grant-to-signed-in.js +3 -3
- package/dist/presets/grant-to-signed-in.js.map +1 -1
- package/dist/presets/organisations-as-tenants.d.ts.map +1 -1
- package/dist/presets/organisations-as-tenants.js +2 -1
- package/dist/presets/organisations-as-tenants.js.map +1 -1
- package/dist/refusals/project-sources.d.ts +2 -2
- package/dist/refusals/project-sources.d.ts.map +1 -1
- package/dist/refusals/project-sources.js +3 -3
- package/dist/refusals/project-sources.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +2 -0
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workspace/workspace.d.ts +7 -0
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/dist/workspace/workspace.js +13 -2
- package/dist/workspace/workspace.js.map +1 -1
- package/package.json +2 -2
- package/templates/architecture/extractable.declared.spec.ts.tpl +1 -1
- package/templates/architecture/extractable.manual.spec.ts.tpl +2 -2
- package/templates/architecture/extractable.tsyringe.spec.ts.tpl +1 -1
- package/templates/background-job/background-job.spec.ts.tpl +1 -1
- package/templates/command/handler.spec.tsyringe.ts.tpl +1 -1
- package/templates/context/module.manual.ts.tpl +1 -1
- package/templates/init/README.md.tpl +9 -9
- package/templates/init/docker/env.example.tpl +1 -1
- package/templates/init/e2e/create-credentials.none.ts.tpl +2 -2
- package/templates/init/e2e/start-application.database.ts.tpl +2 -2
- package/templates/init/e2e/start-application.memory.ts.tpl +2 -2
- package/templates/init/main.ts.tpl +5 -5
- package/templates/init/platform/audit/audit.module.manual.ts.tpl +6 -6
- package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +2 -2
- package/templates/init/platform/audit/create-audit.ts.tpl +1 -1
- package/templates/init/platform/audit/{search-audit-entries.controller.ts.tpl → search-audit-entries/search-audit-entries.controller.ts.tpl} +1 -1
- package/templates/init/platform/audit/{search-audit-entries.handler.ts.tpl → search-audit-entries/search-audit-entries.handler.ts.tpl} +1 -1
- package/templates/init/platform/audit/{search-audit-entries.route.ts.tpl → search-audit-entries/search-audit-entries.route.ts.tpl} +1 -1
- package/templates/init/platform/auth/{attribute-policies.ts.tpl → attributes/attribute-policies.ts.tpl} +1 -1
- package/templates/init/platform/auth/{create-authenticator.none.ts.tpl → authentication/create-authenticator.none.ts.tpl} +1 -1
- package/templates/init/platform/auth/{http-boundary.ts.tpl → authentication/http-boundary.ts.tpl} +1 -1
- package/templates/init/platform/auth/{principal-of.none.ts.tpl → authentication/principal-of.none.ts.tpl} +1 -1
- package/templates/init/platform/auth/{security-schemes.none.ts.tpl → authentication/security-schemes.none.ts.tpl} +1 -1
- package/templates/init/platform/auth/{authorization.tsyringe.ts.tpl → authorization/authorization.tsyringe.ts.tpl} +2 -2
- package/templates/init/platform/auth/{create-authorizer.abac.ts.tpl → authorization/create-authorizer.abac.ts.tpl} +1 -1
- package/templates/init/platform/auth/{create-authorizer.custom.ts.tpl → authorization/create-authorizer.custom.ts.tpl} +2 -2
- package/templates/init/platform/auth/{create-authorizer.rbac.ts.tpl → authorization/create-authorizer.rbac.ts.tpl} +2 -2
- package/templates/init/platform/auth/{create-authorizer.rebac.ts.tpl → authorization/create-authorizer.rebac.ts.tpl} +3 -3
- package/templates/init/platform/auth/{custom-authorizer.contract.spec.ts.tpl → custom/custom-authorizer.contract.spec.ts.tpl} +1 -1
- package/templates/init/platform/auth/{create-tuple-store.contract.spec.ts.tpl → relationships/create-tuple-store.contract.spec.ts.tpl} +1 -1
- package/templates/init/platform/auth/{permission-mapping.ts.tpl → relationships/permission-mapping.ts.tpl} +1 -1
- package/templates/init/platform/auth/{relate-system-actors.ts.tpl → relationships/relate-system-actors.ts.tpl} +1 -1
- package/templates/init/platform/auth/{relation-tuples.ts.tpl → relationships/relation-tuples.ts.tpl} +2 -2
- package/templates/init/platform/auth/{roles.ts.tpl → roles/roles.ts.tpl} +1 -1
- package/templates/init/platform/buses/create-command-bus.ts.tpl +1 -1
- package/templates/init/platform/buses/create-query-bus.ts.tpl +1 -1
- package/templates/init/platform/{compose-application.manual.ts.tpl → composition/compose-application.manual.ts.tpl} +4 -4
- package/templates/init/platform/{compose-application.tsyringe.ts.tpl → composition/compose-application.tsyringe.ts.tpl} +8 -8
- package/templates/init/platform/{create-platform.manual.ts.tpl → composition/create-platform.manual.ts.tpl} +5 -5
- package/templates/init/platform/{lay-foundations.tsyringe.ts.tpl → composition/lay-foundations.tsyringe.ts.tpl} +1 -1
- package/templates/init/platform/{platform.manual.ts.tpl → composition/platform.manual.ts.tpl} +1 -1
- package/templates/init/platform/http/create-app-module.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.express.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.fastify.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.hono.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.nest.ts.tpl +1 -1
- package/templates/init/platform/http/with-documentation.ts.tpl +1 -1
- package/templates/init/rules/platform.md.tpl +7 -6
- package/templates/init/scripts/openapi.ts.tpl +3 -3
- package/templates/job/job.spec.tsyringe.ts.tpl +1 -1
- package/templates/pipeline/github/workflows/ci.yml.tpl +12 -12
- package/templates/pipeline/github/workflows/codeql.yml +1 -1
- package/templates/pipeline/github/workflows/copilot-setup-steps.yml +1 -1
- package/templates/pipeline/github/workflows/pr-title.yml +1 -1
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/presets/identity/context/test/worlds/__context__.world.ts.tpl +1 -1
- package/templates/process/timeout-job.spec.ts.tpl +1 -1
- package/templates/query/handler.spec.tsyringe.ts.tpl +1 -1
- package/templates/query/search.handler.spec.tsyringe.ts.tpl +1 -1
- package/templates/service/main.ts.tpl +5 -5
- package/templates/test-world/world.tsyringe.ts.tpl +1 -1
- package/templates/worker/main.ts.tpl +5 -5
- /package/templates/init/platform/audit/{search-audit-entries.query.ts.tpl → search-audit-entries/search-audit-entries.query.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{create-authenticator.jwt.ts.tpl → authentication/create-authenticator.jwt.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{create-authenticator.keycloak.ts.tpl → authentication/create-authenticator.keycloak.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{development-actor-header.ts.tpl → authentication/development-actor-header.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{development-header-authenticator.ts.tpl → authentication/development-header-authenticator.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{offline-authenticator.ts.tpl → authentication/offline-authenticator.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{principal-of.tokens.ts.tpl → authentication/principal-of.tokens.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{security-schemes.tokens.ts.tpl → authentication/security-schemes.tokens.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{access-policies.ts.tpl → authorization/access-policies.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{log-decisions.ts.tpl → authorization/log-decisions.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{permissions.ts.tpl → authorization/permissions.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{role.ts.tpl → authorization/role.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{use-case-protection.ts.tpl → authorization/use-case-protection.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{custom-authorizer.ts.tpl → custom/custom-authorizer.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{create-tuple-store.ts.tpl → relationships/create-tuple-store.ts.tpl} +0 -0
- /package/templates/init/platform/auth/{relationship-schema.ts.tpl → relationships/relationship-schema.ts.tpl} +0 -0
- /package/templates/init/platform/{platform-test.module.tsyringe.ts.tpl → composition/platform-test.module.tsyringe.ts.tpl} +0 -0
- /package/templates/init/platform/{platform.module.tsyringe.ts.tpl → composition/platform.module.tsyringe.ts.tpl} +0 -0
- /package/templates/init/platform/{job-settings.ts.tpl → jobs/job-settings.ts.tpl} +0 -0
- /package/templates/init/platform/{errors.ts.tpl → observability/errors.ts.tpl} +0 -0
- /package/templates/init/platform/{tracing.ts.tpl → observability/tracing.ts.tpl} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisations-as-tenants.d.ts","sourceRoot":"","sources":["../../src/presets/organisations-as-tenants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"organisations-as-tenants.d.ts","sourceRoot":"","sources":["../../src/presets/organisations-as-tenants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AA0BlD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAuBzD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { platformPath } from '../generate/platform-path.js';
|
|
1
2
|
const KEYCLOAK_CALL = 'return keycloakAuthenticator({ baseUrl, realm, audience, ...(clientId === undefined ? {} : { clientId }) });';
|
|
2
3
|
const READS_ORGANISATIONS = "tenantClaim: 'organization'";
|
|
3
4
|
const READING = [
|
|
@@ -25,7 +26,7 @@ export function organisationsAsTenants(scope) {
|
|
|
25
26
|
if (scope.config.stack.tenancy === 'none' || scope.config.stack.authn === 'none') {
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
|
-
const file =
|
|
29
|
+
const file = platformPath(scope, 'auth/authentication/create-authenticator.ts');
|
|
29
30
|
const source = scope.ws.read(file);
|
|
30
31
|
if (source?.includes(READS_ORGANISATIONS) === true) {
|
|
31
32
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organisations-as-tenants.js","sourceRoot":"","sources":["../../src/presets/organisations-as-tenants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organisations-as-tenants.js","sourceRoot":"","sources":["../../src/presets/organisations-as-tenants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,aAAa,GACjB,8GAA8G,CAAC;AAEjH,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;AAE1D,MAAM,OAAO,GAAG;IACd,gCAAgC;IAChC,cAAc;IACd,YAAY;IACZ,eAAe;IACf,OAAO,mBAAmB,GAAG;IAC7B,sDAAsD;IACtD,OAAO;CACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,UAAU,GAAG,oGAAoG,CAAC;AAExH,MAAM,iBAAiB,GAAG;IACxB,kGAAkG;IAClG,kGAAkG;IAClG,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAY;IACjD,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;QACjF,OAAO;IACT,CAAC;IAED,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,EAAE,6CAA6C,CAAC,CAAC;IAChF,MAAM,MAAM,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEnC,IAAI,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC,KAAK,IAAI,EAAE,CAAC;QACnD,OAAO;IACT,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,UAAU,IAAI,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC;QACxF,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;QAErG,OAAO;IACT,CAAC;IAED,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC;QACZ,IAAI;QACJ,MAAM,EAAE,qCAAqC;QAC7C,IAAI,EAAE,8KAA8K,KAAK,CAAC,OAAO,CAAC,KAAK,eAAe;KACvN,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Config } from '../config/index.js';
|
|
2
2
|
import type { Workspace } from '../workspace/index.js';
|
|
3
|
-
/** Every TypeScript file under the source root
|
|
4
|
-
export declare function projectSources(ws: Workspace, config: Config): string[];
|
|
3
|
+
/** Every TypeScript file under the source root, under `test/` at the root of the project, and under the other directories named. */
|
|
4
|
+
export declare function projectSources(ws: Workspace, config: Config, others?: readonly string[]): string[];
|
|
5
5
|
//# sourceMappingURL=project-sources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-sources.d.ts","sourceRoot":"","sources":["../../src/refusals/project-sources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,
|
|
1
|
+
{"version":3,"file":"project-sources.d.ts","sourceRoot":"","sources":["../../src/refusals/project-sources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,oIAAoI;AACpI,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,EAAE,CAEtG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/** Every TypeScript file under the source root
|
|
2
|
-
export function projectSources(ws, config) {
|
|
3
|
-
return [config.sourceRoot, 'test'].flatMap((directory) => sourcesUnder(ws, directory));
|
|
1
|
+
/** Every TypeScript file under the source root, under `test/` at the root of the project, and under the other directories named. */
|
|
2
|
+
export function projectSources(ws, config, others = []) {
|
|
3
|
+
return [config.sourceRoot, 'test', ...others].flatMap((directory) => sourcesUnder(ws, directory));
|
|
4
4
|
}
|
|
5
5
|
function sourcesUnder(ws, directory) {
|
|
6
6
|
const here = ws.list(directory).filter((name) => /\.(?:ts|tsx|mts)$/.test(name) && !name.endsWith('.d.ts'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-sources.js","sourceRoot":"","sources":["../../src/refusals/project-sources.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"project-sources.js","sourceRoot":"","sources":["../../src/refusals/project-sources.ts"],"names":[],"mappings":"AAGA,oIAAoI;AACpI,MAAM,UAAU,cAAc,CAAC,EAAa,EAAE,MAAc,EAAE,MAAM,GAAsB,EAAE;IAC1F,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;AACpG,CAAC;AAED,SAAS,YAAY,CAAC,EAAa,EAAE,SAAiB;IACpD,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5G,MAAM,KAAK,GAAG,EAAE;SACb,WAAW,CAAC,SAAS,CAAC;SACtB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,cAAc,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,WAAW,CAAC;SACpF,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,GAAG,SAAS,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IAE/D,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,SAAS,IAAI,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC;AACnE,CAAC"}
|
package/dist/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAkF3C,wBAAgB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,GAAE,EAAc,GAAG,MAAM,CAkCvE"}
|
package/dist/run.js
CHANGED
|
@@ -17,6 +17,7 @@ import { initCommand } from './commands/init.js';
|
|
|
17
17
|
import { listCommand } from './commands/list.js';
|
|
18
18
|
import { mergeTrunkCommand } from './commands/merge-trunk.js';
|
|
19
19
|
import { planWavesCommand } from './commands/plan-waves.js';
|
|
20
|
+
import { platformFoldersCommand } from './commands/platform-folders.js';
|
|
20
21
|
import { sdkCommand } from './commands/sdk.js';
|
|
21
22
|
import { statusCommand } from './commands/status.js';
|
|
22
23
|
import { storyCheckCommand } from './commands/story-check.js';
|
|
@@ -63,6 +64,7 @@ const COMMANDS = {
|
|
|
63
64
|
'drizzle-generate': drizzleGenerateCommand,
|
|
64
65
|
'error-factories': errorFactoriesCommand,
|
|
65
66
|
'value-objects': valueObjectsCommand,
|
|
67
|
+
'platform-folders': platformFoldersCommand,
|
|
66
68
|
controllers: controllersCommand,
|
|
67
69
|
check: checksCommand,
|
|
68
70
|
'check-file': checkFileCommand,
|
package/dist/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACj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AAC,UAAU,KAAK,CAAC,OAAO,YAAY,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,KAAK,CAAC,QAAQ,CAAC;IACxB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,IAAI,QAAQ,CAAC,oBAAoB,IAAI,IAAI,EAAE,eAAe,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvG,CAAC;AAED,4GAA4G;AAC5G,SAAS,OAAO,CAAC,IAAuB;IACtC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAErF,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC/E,CAAC;AAED,SAAS,IAAI;IACX,OAAO,cAAc,OAAO;;EAE5B,aAAa,EAAE,EAAE,CAAC;AACpB,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.84.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.84.1';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -13,6 +13,7 @@ export declare class Workspace {
|
|
|
13
13
|
private readonly pending;
|
|
14
14
|
private readonly skipped;
|
|
15
15
|
private readonly steps;
|
|
16
|
+
private rewrite;
|
|
16
17
|
constructor(root: string, force: boolean);
|
|
17
18
|
exists(file: string): boolean;
|
|
18
19
|
read(file: string): string | undefined;
|
|
@@ -25,6 +26,11 @@ export declare class Workspace {
|
|
|
25
26
|
/** Never replaces a file the user may have edited, unless asked to with --force. */
|
|
26
27
|
create(file: string, content: string): boolean;
|
|
27
28
|
update(file: string, written: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Every module this command writes names the files of the project through `rewrite`: a project
|
|
31
|
+
* that keeps its platform flat is written imports of the flat files.
|
|
32
|
+
*/
|
|
33
|
+
rewriteImports(rewrite: (file: string, text: string) => string): void;
|
|
28
34
|
/** A text written for npm, as the package manager of the project says it: what is compared with a file is compared in its dialect. */
|
|
29
35
|
spoken(text: string): string;
|
|
30
36
|
note(message: string): void;
|
|
@@ -35,5 +41,6 @@ export declare class Workspace {
|
|
|
35
41
|
private onDisk;
|
|
36
42
|
private write;
|
|
37
43
|
private absolute;
|
|
44
|
+
private withImports;
|
|
38
45
|
}
|
|
39
46
|
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/workspace/workspace.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D;;;;;GAKG;AACH,qBAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/workspace/workspace.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;A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C,MAAM,EAAE,OAAO,GAAG,eAAe,CAwBvC;IAED,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,MAAM;IAYd,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,WAAW;CAGpB"}
|
|
@@ -17,6 +17,7 @@ export class Workspace {
|
|
|
17
17
|
pending = new Map();
|
|
18
18
|
skipped = new Set();
|
|
19
19
|
steps = [];
|
|
20
|
+
rewrite;
|
|
20
21
|
constructor(root, force) {
|
|
21
22
|
this.root = root;
|
|
22
23
|
this.force = force;
|
|
@@ -65,11 +66,11 @@ export class Workspace {
|
|
|
65
66
|
}
|
|
66
67
|
return false;
|
|
67
68
|
}
|
|
68
|
-
this.pending.set(file, { content: this.spoken(content), existed: onDisk });
|
|
69
|
+
this.pending.set(file, { content: this.spoken(this.withImports(file, content)), existed: onDisk });
|
|
69
70
|
return true;
|
|
70
71
|
}
|
|
71
72
|
update(file, written) {
|
|
72
|
-
const content = this.spoken(written);
|
|
73
|
+
const content = this.spoken(this.withImports(file, written));
|
|
73
74
|
const pending = this.pending.get(file);
|
|
74
75
|
if (pending !== undefined) {
|
|
75
76
|
pending.content = content;
|
|
@@ -80,6 +81,13 @@ export class Workspace {
|
|
|
80
81
|
}
|
|
81
82
|
this.pending.set(file, { content, existed: true });
|
|
82
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Every module this command writes names the files of the project through `rewrite`: a project
|
|
86
|
+
* that keeps its platform flat is written imports of the flat files.
|
|
87
|
+
*/
|
|
88
|
+
rewriteImports(rewrite) {
|
|
89
|
+
this.rewrite = rewrite;
|
|
90
|
+
}
|
|
83
91
|
/** A text written for npm, as the package manager of the project says it: what is compared with a file is compared in its dialect. */
|
|
84
92
|
spoken(text) {
|
|
85
93
|
return inDialect(text, packageManagerOf(this.read(CONFIG_FILE)));
|
|
@@ -138,6 +146,9 @@ export class Workspace {
|
|
|
138
146
|
absolute(file) {
|
|
139
147
|
return path.join(this.root, file);
|
|
140
148
|
}
|
|
149
|
+
withImports(file, text) {
|
|
150
|
+
return this.rewrite !== undefined && /\.(?:ts|tsx|mts|js|mjs)$/.test(file) ? this.rewrite(file, text) : text;
|
|
151
|
+
}
|
|
141
152
|
}
|
|
142
153
|
function isLanguageStep(todo) {
|
|
143
154
|
return todo.text.startsWith('define the ubiquitous language first');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/workspace/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAQxC;;;;;GAKG;AACH,MAAM,OAAO,SAAS;
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/workspace/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAQxC;;;;;GAKG;AACH,MAAM,OAAO,SAAS;IAYT,IAAI;IACI,KAAK;IAZf,KAAK,GAAa,EAAE,CAAC;IAEb,OAAO,GAAG,IAAI,GAAG,EAAmB,CAAC;IAErC,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAE5B,KAAK,GAAe,EAAE,CAAC;IAEhC,OAAO,CAAuD;IAEtE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
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ddd-ts-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.84.1",
|
|
4
4
|
"description": "Bootstrap, scaffold and verify Domain-Driven Design (DDD), Clean Architecture and hexagonal TypeScript backends on Node.js: project and code generators, architecture checks, OpenAPI and AsyncAPI documents, for developers and AI coding agents (Claude Code, Codex, GitHub Copilot).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
"clean:packages": "node dist/bin.js check --clean-only ../kernel/src ../validation/src ../http/src ../tracing/src ../di/src ../events/src ../testing/src ../s3/src ../drizzle/src ../knex/src ../prisma/src ../typeorm/src ../aspects/src ../rabbitmq/src ../auth/src ../audit/src ../redis/src ../scheduling/src ../pino/src ../winston/src ../sentry/src ../kafka/src ../nats/src ../eslint-plugin/src"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@ddd-ts-kit/kernel": "^0.
|
|
55
|
+
"@ddd-ts-kit/kernel": "^0.84.1"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it } from '{{tests.module}}';
|
|
|
2
2
|
import { authorizationModule } from '@ddd-ts-kit/auth/di';
|
|
3
3
|
import { AllowAll } from '@ddd-ts-kit/auth/testing';
|
|
4
4
|
import { createTestApplication, type ContextModule } from '@ddd-ts-kit/di';
|
|
5
|
-
import { platformTestModule } from '{{alias.platform}}/platform-test.module{{alias.ext}}';
|
|
5
|
+
import { platformTestModule } from '{{alias.platform}}/composition/platform-test.module{{alias.ext}}';
|
|
6
6
|
// ddd-ts-kit:imports
|
|
7
7
|
// /ddd-ts-kit:imports
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, it } from '{{tests.module}}';
|
|
2
|
-
import { createPlatform } from '{{alias.platform}}/create-platform{{alias.ext}}';
|
|
2
|
+
import { createPlatform } from '{{alias.platform}}/composition/create-platform{{alias.ext}}';
|
|
3
3
|
import { inertPersistence } from '{{alias.platform}}/database/inert-persistence{{alias.ext}}';
|
|
4
4
|
import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
|
|
5
|
-
import type { Platform } from '{{alias.platform}}/platform{{alias.ext}}';
|
|
5
|
+
import type { Platform } from '{{alias.platform}}/composition/platform{{alias.ext}}';
|
|
6
6
|
// ddd-ts-kit:imports
|
|
7
7
|
// /ddd-ts-kit:imports
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it } from '{{tests.module}}';
|
|
|
2
2
|
import { authorizationModule } from '@ddd-ts-kit/auth/di';
|
|
3
3
|
import { AllowAll } from '@ddd-ts-kit/auth/testing';
|
|
4
4
|
import { createTestApplication, type ContextModule } from '@ddd-ts-kit/di';
|
|
5
|
-
import { platformTestModule } from '{{alias.platform}}/platform-test.module{{alias.ext}}';
|
|
5
|
+
import { platformTestModule } from '{{alias.platform}}/composition/platform-test.module{{alias.ext}}';
|
|
6
6
|
// ddd-ts-kit:imports
|
|
7
7
|
// /ddd-ts-kit:imports
|
|
8
8
|
|
|
@@ -4,7 +4,7 @@ import { authorizationModule } from '@ddd-ts-kit/auth/di';
|
|
|
4
4
|
{{spec.diPlain}}
|
|
5
5
|
{{spec.contextImports}}
|
|
6
6
|
import type { Actor, Message } from '@ddd-ts-kit/kernel';
|
|
7
|
-
import { platformTestModule } from '{{alias.platform}}/platform-test.module{{alias.ext}}';
|
|
7
|
+
import { platformTestModule } from '{{alias.platform}}/composition/platform-test.module{{alias.ext}}';
|
|
8
8
|
{{job.permissionsImport}}
|
|
9
9
|
import { {{job.command}}Command } from '{{alias.context}}/application/commands/{{job.commandKebab}}/{{job.commandKebab}}.command{{alias.ext}}';
|
|
10
10
|
{{job.specImport}}
|
|
@@ -11,7 +11,7 @@ import { anActor } from '@ddd-ts-kit/auth/testing';
|
|
|
11
11
|
{{spec.diPlain}}
|
|
12
12
|
{{/unless}}
|
|
13
13
|
{{spec.contextImports}}
|
|
14
|
-
import { platformTestModule } from '{{alias.platform}}/platform-test.module{{alias.ext}}';
|
|
14
|
+
import { platformTestModule } from '{{alias.platform}}/composition/platform-test.module{{alias.ext}}';
|
|
15
15
|
{{#if access.protected}}
|
|
16
16
|
import { {{context.camel}}Permissions } from '{{alias.context}}/application/authorization/{{context.kebab}}.permissions{{alias.ext}}';
|
|
17
17
|
{{/if}}
|
|
@@ -2,7 +2,7 @@ import type { UseCaseDeclaration } from '@ddd-ts-kit/auth';
|
|
|
2
2
|
{{#if http.any}}
|
|
3
3
|
import type { Route } from '@ddd-ts-kit/http';
|
|
4
4
|
{{/if}}
|
|
5
|
-
import type { Platform } from '{{alias.platform}}/platform{{alias.ext}}';
|
|
5
|
+
import type { Platform } from '{{alias.platform}}/composition/platform{{alias.ext}}';
|
|
6
6
|
// ddd-ts-kit:imports
|
|
7
7
|
// /ddd-ts-kit:imports
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ migrations that a merge left out of order (`npx ddd-ts-kit explain persistence/m
|
|
|
40
40
|
`npm run dev` restarts the application when a source file changes. It runs `tsx watch`, which
|
|
41
41
|
executes TypeScript directly and resolves an import alias from the `paths` of `tsconfig.json`;
|
|
42
42
|
`--env-file-if-exists=.env` gives Node the variables of `.env`
|
|
43
|
-
when the file is there, and `--import` loads `{{config.platformDir}}/tracing.ts` before
|
|
43
|
+
when the file is there, and `--import` loads `{{config.platformDir}}/observability/tracing.ts` before
|
|
44
44
|
everything else so that instrumentation is installed first.
|
|
45
45
|
`{{config.platformDir}}/config/load-config.ts` validates the variables and refuses to start when
|
|
46
46
|
one is wrong.
|
|
@@ -63,12 +63,12 @@ the error codes of each operation, a credential per security scheme, no runtime
|
|
|
63
63
|
|
|
64
64
|
{{#if errors.none}}
|
|
65
65
|
`{{config.sourceRoot}}/main.ts` is the composition root: tracing first, then the validated
|
|
66
|
-
configuration, the storage, and `composeApplication` of `{{config.platformDir}}/compose-application.ts`.
|
|
66
|
+
configuration, the storage, and `composeApplication` of `{{config.platformDir}}/composition/compose-application.ts`.
|
|
67
67
|
{{/if}}
|
|
68
68
|
{{#if errors.sentry}}
|
|
69
69
|
`{{config.sourceRoot}}/main.ts` is the composition root: tracing first, error reporting second
|
|
70
|
-
(`{{config.platformDir}}/errors.ts`), then the validated configuration, the storage, and
|
|
71
|
-
`composeApplication` of `{{config.platformDir}}/compose-application.ts`.
|
|
70
|
+
(`{{config.platformDir}}/observability/errors.ts`), then the validated configuration, the storage, and
|
|
71
|
+
`composeApplication` of `{{config.platformDir}}/composition/compose-application.ts`.
|
|
72
72
|
{{/if}}
|
|
73
73
|
|
|
74
74
|
- **A port is an abstract class, and the class is what is injected.** A repository port lives in
|
|
@@ -80,13 +80,13 @@ configuration, the storage, and `composeApplication` of `{{config.platformDir}}/
|
|
|
80
80
|
{{#if di.tsyringe}}
|
|
81
81
|
- **Three modules, then the contexts.** `kernelModule({...})` binds the ports of the kernel to what
|
|
82
82
|
this platform chose (one execution scope, one clock, the two buses with their middlewares);
|
|
83
|
-
`platformModule` (`{{config.platformDir}}/platform.module.ts`) rebinds what needs the storage{{#if broker.external}}, the broker{{/if}}{{#if cache.redis}} or the Redis protocol server{{/if}}
|
|
83
|
+
`platformModule` (`{{config.platformDir}}/composition/platform.module.ts`) rebinds what needs the storage{{#if broker.external}}, the broker{{/if}}{{#if cache.redis}} or the Redis protocol server{{/if}}
|
|
84
84
|
(`builder.rebind(UnitOfWork)`, `builder.bind({{persistence.tokenOrNone}})`...); the authorization
|
|
85
85
|
module binds the guard both buses ask first. Replacing a provider happens in the platform module
|
|
86
86
|
and nowhere else.
|
|
87
87
|
{{/if}}
|
|
88
88
|
{{#unless di.tsyringe}}
|
|
89
|
-
- **One `Platform`, handed to each context.** `createPlatform` (`{{config.platformDir}}/create-platform.ts`)
|
|
89
|
+
- **One `Platform`, handed to each context.** `createPlatform` (`{{config.platformDir}}/composition/create-platform.ts`)
|
|
90
90
|
builds the buses, the clock, the storage and the event ports once; the module file of a context
|
|
91
91
|
receives it and registers its handlers, adapters and jobs on it. Replacing a provider happens
|
|
92
92
|
there and nowhere else.
|
|
@@ -144,7 +144,7 @@ and `execution.scheduledAt` says which period the work is for.
|
|
|
144
144
|
| Variable | Says |
|
|
145
145
|
|---|---|
|
|
146
146
|
| `RUN_JOBS` | whether this process runs the jobs by time ({{#if worker.off}}`true` by default{{/if}}{{#if worker.on}}`false` by default: the worker runs them{{/if}}) |
|
|
147
|
-
| `JOB_<CONTEXT>_<JOB>_ENABLED` | `false` switches one job off in one environment (`{{config.platformDir}}/job-settings.ts`, where a schedule or a timeout can be read from the environment too) |
|
|
147
|
+
| `JOB_<CONTEXT>_<JOB>_ENABLED` | `false` switches one job off in one environment (`{{config.platformDir}}/jobs/job-settings.ts`, where a schedule or a timeout can be read from the environment too) |
|
|
148
148
|
|
|
149
149
|
- **A dedicated worker**: `npx ddd-ts-kit generate worker` writes `{{config.sourceRoot}}/apps/worker/main.ts`
|
|
150
150
|
(the same modules as `main.ts`, no HTTP server, the jobs started whatever `RUN_JOBS` says), the
|
|
@@ -191,7 +191,7 @@ upload; see https://github.com/gbourgeat/ddd-ts-kit/blob/main/docs/concepts/file
|
|
|
191
191
|
|
|
192
192
|
Unexpected failures go to an error tracker through the kernel `ErrorReporter`, bound to
|
|
193
193
|
`@ddd-ts-kit/sentry`: Sentry or GlitchTip, which speak the same protocol, so only the DSN differs.
|
|
194
|
-
`{{config.platformDir}}/errors.ts` starts it, second import of every entry point, and nothing in
|
|
194
|
+
`{{config.platformDir}}/observability/errors.ts` starts it, second import of every entry point, and nothing in
|
|
195
195
|
`domain/` or `application/` reports anything: a handler throws, and what stands around it reports.
|
|
196
196
|
|
|
197
197
|
| Variable | Says |
|
|
@@ -222,7 +222,7 @@ One failure is one report: the first boundary that sees an error reports it, the
|
|
|
222
222
|
it. Each report carries the trace id of the active span, which opens the trace in the tracing
|
|
223
223
|
backend. What leaves the process is scrubbed first: no request body, header, cookie or query
|
|
224
224
|
string, no local variable, no breadcrumb, no email or name (the actor id only), no tenant. The
|
|
225
|
-
message of the error is sent: `scrubMessages: true` in `{{config.platformDir}}/errors.ts` removes
|
|
225
|
+
message of the error is sent: `scrubMessages: true` in `{{config.platformDir}}/observability/errors.ts` removes
|
|
226
226
|
it for everything that is not a `DomainError`, which is the setting for a tracker hosted by a
|
|
227
227
|
third party. The README of `@ddd-ts-kit/sentry` has the full table and the other options
|
|
228
228
|
(`sampleRate`, `tagTenant`, `beforeSend`).
|
|
@@ -22,7 +22,7 @@ LOG_LEVEL=info
|
|
|
22
22
|
# API_DOCS=true
|
|
23
23
|
{{/if}}
|
|
24
24
|
# Scheduled jobs. RUN_JOBS says whether this process runs them: {{#if worker.off}}true by default; `ddd-ts-kit generate worker` moves them to a process of their own{{/if}}{{#if worker.on}}false by default, the worker (apps/worker) runs them{{/if}}.
|
|
25
|
-
# One job is switched off in one environment with JOB_<CONTEXT>_<JOB>_ENABLED=false (see {{config.platformDir}}/job-settings.ts).
|
|
25
|
+
# One job is switched off in one environment with JOB_<CONTEXT>_<JOB>_ENABLED=false (see {{config.platformDir}}/jobs/job-settings.ts).
|
|
26
26
|
{{#if worker.off}}
|
|
27
27
|
# RUN_JOBS=true
|
|
28
28
|
{{/if}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Authenticator } from '@ddd-ts-kit/auth';
|
|
2
2
|
import type { HttpHeaders } from '@ddd-ts-kit/testing/e2e';
|
|
3
|
-
import { developmentActorHeader } from '{{alias.platform}}/auth/development-actor-header{{alias.ext}}';
|
|
4
|
-
import { DevelopmentHeaderAuthenticator } from '{{alias.platform}}/auth/development-header-authenticator{{alias.ext}}';
|
|
3
|
+
import { developmentActorHeader } from '{{alias.platform}}/auth/authentication/development-actor-header{{alias.ext}}';
|
|
4
|
+
import { DevelopmentHeaderAuthenticator } from '{{alias.platform}}/auth/authentication/development-header-authenticator{{alias.ext}}';
|
|
5
5
|
|
|
6
6
|
/** Who a test calls as: the identity, the roles and the tenant the development header carries. */
|
|
7
7
|
export interface TestActor {
|
|
@@ -9,9 +9,9 @@ import type { IntegrationEventSubscriber } from '@ddd-ts-kit/kernel';
|
|
|
9
9
|
{{/unless}}
|
|
10
10
|
import { createHttpClient, settled, type HttpClient, type SettledOptions } from '@ddd-ts-kit/testing/e2e';
|
|
11
11
|
{{#if authz.rebac}}
|
|
12
|
-
import { relationTuples } from '{{alias.platform}}/auth/relation-tuples{{alias.ext}}';
|
|
12
|
+
import { relationTuples } from '{{alias.platform}}/auth/relationships/relation-tuples{{alias.ext}}';
|
|
13
13
|
{{/if}}
|
|
14
|
-
import { composeApplication } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
14
|
+
import { composeApplication } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
|
|
15
15
|
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
16
16
|
import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
|
|
17
17
|
import { openTestDatabase, type TestDatabase } from '{{alias.platform}}/database/open-test-database{{alias.ext}}';
|
|
@@ -9,9 +9,9 @@ import type { IntegrationEventSubscriber } from '@ddd-ts-kit/kernel';
|
|
|
9
9
|
{{/unless}}
|
|
10
10
|
import { createHttpClient, settled, type HttpClient, type SettledOptions } from '@ddd-ts-kit/testing/e2e';
|
|
11
11
|
{{#if authz.rebac}}
|
|
12
|
-
import { relationTuples } from '{{alias.platform}}/auth/relation-tuples{{alias.ext}}';
|
|
12
|
+
import { relationTuples } from '{{alias.platform}}/auth/relationships/relation-tuples{{alias.ext}}';
|
|
13
13
|
{{/if}}
|
|
14
|
-
import { composeApplication } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
14
|
+
import { composeApplication } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
|
|
15
15
|
{{#if broker.provided}}
|
|
16
16
|
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
17
17
|
{{/if}}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// Imported first on purpose: instrumentation has to be installed before any module it patches is loaded.
|
|
2
|
-
import { tracing } from '{{alias.platform}}/tracing{{alias.ext}}';
|
|
2
|
+
import { tracing } from '{{alias.platform}}/observability/tracing{{alias.ext}}';
|
|
3
3
|
{{#if errors.sentry}}
|
|
4
4
|
// Imported second on purpose: a failure while the rest of the application loads is already reported.
|
|
5
|
-
import { errors } from '{{alias.platform}}/errors{{alias.ext}}';
|
|
5
|
+
import { errors } from '{{alias.platform}}/observability/errors{{alias.ext}}';
|
|
6
6
|
{{/if}}
|
|
7
7
|
{{#if httpCache.varnish}}
|
|
8
8
|
import { VarnishCachePurger } from '@ddd-ts-kit/http/purgers';
|
|
9
9
|
import { PurgingPublisher } from '@ddd-ts-kit/kernel';
|
|
10
10
|
{{/if}}
|
|
11
11
|
{{#if http.any}}
|
|
12
|
-
import { createAuthenticator } from '{{alias.platform}}/auth/create-authenticator{{alias.ext}}';
|
|
12
|
+
import { createAuthenticator } from '{{alias.platform}}/auth/authentication/create-authenticator{{alias.ext}}';
|
|
13
13
|
{{/if}}
|
|
14
|
-
import { composeApplication } from '{{alias.platform}}/compose-application{{alias.ext}}';
|
|
14
|
+
import { composeApplication } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
|
|
15
15
|
import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
|
|
16
16
|
import { openPersistence } from '{{alias.platform}}/database/open-persistence{{alias.ext}}';
|
|
17
17
|
import { {{events.providerName}} } from '{{alias.platform}}/events/{{events.providerFile}}{{alias.ext}}';
|
|
@@ -24,7 +24,7 @@ import { openFiles } from '{{alias.platform}}/files/open-files{{alias.ext}}';
|
|
|
24
24
|
{{#if http.any}}
|
|
25
25
|
import { startHttpServer } from '{{alias.platform}}/http/start-http-server{{alias.ext}}';
|
|
26
26
|
{{/if}}
|
|
27
|
-
import { jobSettings } from '{{alias.platform}}/job-settings{{alias.ext}}';
|
|
27
|
+
import { jobSettings } from '{{alias.platform}}/jobs/job-settings{{alias.ext}}';
|
|
28
28
|
{{#if cache.redis}}
|
|
29
29
|
import { openRedis } from '{{alias.platform}}/redis/open-redis{{alias.ext}}';
|
|
30
30
|
{{/if}}
|
|
@@ -5,16 +5,16 @@ import { controllerRoutes, type Route } from '@ddd-ts-kit/http';
|
|
|
5
5
|
{{#if audit.functionRoute}}
|
|
6
6
|
import type { Route } from '@ddd-ts-kit/http';
|
|
7
7
|
{{/if}}
|
|
8
|
-
import type { Platform } from '{{alias.platform}}/platform{{alias.ext}}';
|
|
8
|
+
import type { Platform } from '{{alias.platform}}/composition/platform{{alias.ext}}';
|
|
9
9
|
import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions{{alias.ext}}';
|
|
10
|
-
import { SearchAuditEntriesHandler } from '{{alias.platform}}/audit/search-audit-entries.handler{{alias.ext}}';
|
|
11
|
-
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
10
|
+
import { SearchAuditEntriesHandler } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.handler{{alias.ext}}';
|
|
11
|
+
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.query{{alias.ext}}';
|
|
12
12
|
{{#if audit.functionRoute}}
|
|
13
|
-
import { searchAuditEntriesRoute } from '{{alias.platform}}/audit/search-audit-entries.route{{alias.ext}}';
|
|
13
|
+
import { searchAuditEntriesRoute } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.route{{alias.ext}}';
|
|
14
14
|
{{/if}}
|
|
15
15
|
{{#if audit.controller}}
|
|
16
|
-
import { SearchAuditEntriesController } from '{{alias.platform}}/audit/search-audit-entries.controller{{alias.ext}}';
|
|
17
|
-
import { securitySchemes } from '{{alias.platform}}/auth/security-schemes{{alias.ext}}';
|
|
16
|
+
import { SearchAuditEntriesController } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.controller{{alias.ext}}';
|
|
17
|
+
import { securitySchemes } from '{{alias.platform}}/auth/authentication/security-schemes{{alias.ext}}';
|
|
18
18
|
{{/if}}
|
|
19
19
|
|
|
20
20
|
interface AuditWiring {
|
|
@@ -7,8 +7,8 @@ import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions{{al
|
|
|
7
7
|
{{/if}}
|
|
8
8
|
import type { Audit } from '{{alias.platform}}/audit/create-audit{{alias.ext}}';
|
|
9
9
|
{{#if audit.route}}
|
|
10
|
-
import { SearchAuditEntriesHandler } from '{{alias.platform}}/audit/search-audit-entries.handler{{alias.ext}}';
|
|
11
|
-
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
10
|
+
import { SearchAuditEntriesHandler } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.handler{{alias.ext}}';
|
|
11
|
+
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.query{{alias.ext}}';
|
|
12
12
|
{{/if}}
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -47,7 +47,7 @@ import { auditPermissions } from '{{alias.platform}}/audit/audit.permissions{{al
|
|
|
47
47
|
{{/if}}
|
|
48
48
|
import { auditedEvents } from '{{alias.platform}}/audit/audited-events{{alias.ext}}';
|
|
49
49
|
{{#if audit.route}}
|
|
50
|
-
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
50
|
+
import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.query{{alias.ext}}';
|
|
51
51
|
{{/if}}
|
|
52
52
|
|
|
53
53
|
/** The name the audit trail consumes integration events under: its idempotency scope, and its queues behind a broker. */
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from '@ddd-ts-kit/http';
|
|
12
12
|
import { err, ok, type QueryBus } from '@ddd-ts-kit/kernel';
|
|
13
13
|
import { customSchema, type JsonSchema } from '@ddd-ts-kit/validation';
|
|
14
|
-
import { SearchAuditEntriesQuery, type AuditEntriesFilter } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
14
|
+
import { SearchAuditEntriesQuery, type AuditEntriesFilter } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.query{{alias.ext}}';
|
|
15
15
|
|
|
16
16
|
/** Newest first unless asked otherwise, by cursor: the trail only grows, an offset would shift under the reader. */
|
|
17
17
|
const pageLimits = { sortable: ['occurredAt', 'sequence'], maxSize: 100, kind: 'cursor' } as const;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AuditEntry, AuditReader } from '@ddd-ts-kit/audit';
|
|
2
2
|
import type { Page, QueryHandler } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import type { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
3
|
+
import type { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.query{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
export class SearchAuditEntriesHandler implements QueryHandler<SearchAuditEntriesQuery> {
|
|
6
6
|
constructor(private readonly reader: AuditReader) {}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '@ddd-ts-kit/http';
|
|
11
11
|
import { err, ok, type QueryBus } from '@ddd-ts-kit/kernel';
|
|
12
12
|
import { customSchema, type JsonSchema } from '@ddd-ts-kit/validation';
|
|
13
|
-
import { SearchAuditEntriesQuery, type AuditEntriesFilter } from '{{alias.platform}}/audit/search-audit-entries.query{{alias.ext}}';
|
|
13
|
+
import { SearchAuditEntriesQuery, type AuditEntriesFilter } from '{{alias.platform}}/audit/search-audit-entries/search-audit-entries.query{{alias.ext}}';
|
|
14
14
|
|
|
15
15
|
/** Newest first unless asked otherwise, by cursor: the trail only grows, an offset would shift under the reader. */
|
|
16
16
|
const pageLimits = { sortable: ['occurredAt', 'sequence'], maxSize: 100, kind: 'cursor' } as const;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { permit, type AttributePolicy, type Condition } from '@ddd-ts-kit/auth';
|
|
2
|
-
import { Role } from '{{alias.platform}}/auth/role{{alias.ext}}';
|
|
2
|
+
import { Role } from '{{alias.platform}}/auth/authorization/role{{alias.ext}}';
|
|
3
3
|
|
|
4
4
|
const isAdministrator: Condition = ({ actor }) => actor.roles.includes(Role.Admin);
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Authenticator } from '@ddd-ts-kit/auth';
|
|
2
2
|
import type { AppConfig } from '{{alias.platform}}/config/app-config{{alias.ext}}';
|
|
3
|
-
import { DevelopmentHeaderAuthenticator } from '{{alias.platform}}/auth/development-header-authenticator{{alias.ext}}';
|
|
3
|
+
import { DevelopmentHeaderAuthenticator } from '{{alias.platform}}/auth/authentication/development-header-authenticator{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
// TODO(platform): replace the development authenticator by a real adapter of Authenticator (a JWT verifier, your identity provider) before the first deployment.
|
|
6
6
|
export function createAuthenticator(config: AppConfig): Authenticator {
|
package/templates/init/platform/auth/{http-boundary.ts.tpl → authentication/http-boundary.ts.tpl}
RENAMED
|
@@ -44,7 +44,7 @@ import type { Clock, ErrorReporter, ExecutionScope, Logger, Session } from '@ddd
|
|
|
44
44
|
import { multipartUploads } from '@ddd-ts-kit/http/uploads';
|
|
45
45
|
{{/if}}
|
|
46
46
|
import { tracedRoutes } from '@ddd-ts-kit/tracing';
|
|
47
|
-
import { principalOf } from '{{alias.platform}}/auth/principal-of{{alias.ext}}';
|
|
47
|
+
import { principalOf } from '{{alias.platform}}/auth/authentication/principal-of{{alias.ext}}';
|
|
48
48
|
{{#if presentation.any}}
|
|
49
49
|
import type { Presentation } from '{{alias.platform}}/http/presentation-of{{alias.ext}}';
|
|
50
50
|
{{/if}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveSession, type Authenticator } from '@ddd-ts-kit/auth';
|
|
2
2
|
import type { Session } from '@ddd-ts-kit/kernel';
|
|
3
|
-
import { developmentActorHeader } from '{{alias.platform}}/auth/development-actor-header{{alias.ext}}';
|
|
3
|
+
import { developmentActorHeader } from '{{alias.platform}}/auth/authentication/development-actor-header{{alias.ext}}';
|
|
4
4
|
|
|
5
5
|
/** Reads the development header of a request and answers its session, derived from the actor it names. */
|
|
6
6
|
export function principalOf(authenticator: Authenticator): (raw: unknown) => Promise<Session> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { developmentActorHeader } from '{{alias.platform}}/auth/development-actor-header{{alias.ext}}';
|
|
1
|
+
import { developmentActorHeader } from '{{alias.platform}}/auth/authentication/development-actor-header{{alias.ext}}';
|
|
2
2
|
|
|
3
3
|
/** The scheme routes name in `security`, as the OpenAPI document declares it. */
|
|
4
4
|
export const securitySchemes = { developmentActor: { type: 'apiKey', in: 'header', name: developmentActorHeader } };
|