ddd-ts-kit 0.92.0 → 0.93.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 +36 -0
- package/README.fr.md +12 -7
- package/README.md +9 -5
- package/dist/acceptance/check-locked-files.d.ts +25 -0
- package/dist/acceptance/check-locked-files.d.ts.map +1 -0
- package/dist/acceptance/check-locked-files.js +84 -0
- package/dist/acceptance/check-locked-files.js.map +1 -0
- package/dist/acceptance/scenarios-in.d.ts +4 -0
- package/dist/acceptance/scenarios-in.d.ts.map +1 -1
- package/dist/acceptance/scenarios-in.js +2 -2
- package/dist/acceptance/scenarios-in.js.map +1 -1
- package/dist/commands/acceptance.d.ts.map +1 -1
- package/dist/commands/acceptance.js +14 -0
- package/dist/commands/acceptance.js.map +1 -1
- package/dist/commands/generate.js +2 -0
- package/dist/commands/generate.js.map +1 -1
- package/dist/commit/run-git.d.ts +5 -1
- package/dist/commit/run-git.d.ts.map +1 -1
- package/dist/commit/run-git.js +19 -2
- package/dist/commit/run-git.js.map +1 -1
- package/dist/controllers/finish-migration.js +4 -2
- package/dist/controllers/finish-migration.js.map +1 -1
- package/dist/docs/behaviour-page.d.ts.map +1 -1
- package/dist/docs/behaviour-page.js +9 -1
- package/dist/docs/behaviour-page.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/job/job-vars.d.ts +4 -1
- package/dist/generate/kinds/job/job-vars.d.ts.map +1 -1
- package/dist/generate/kinds/job/job-vars.js +11 -1
- package/dist/generate/kinds/job/job-vars.js.map +1 -1
- package/dist/generate/kinds/job-kind.js +20 -3
- package/dist/generate/kinds/job-kind.js.map +1 -1
- package/dist/generate/kinds/service-kind.d.ts.map +1 -1
- package/dist/generate/kinds/service-kind.js +30 -3
- package/dist/generate/kinds/service-kind.js.map +1 -1
- package/dist/init/files/inert-persistence-file.d.ts +5 -0
- package/dist/init/files/inert-persistence-file.d.ts.map +1 -0
- package/dist/init/files/inert-persistence-file.js +16 -0
- package/dist/init/files/inert-persistence-file.js.map +1 -0
- package/dist/init/files/platform-files.js +6 -1
- package/dist/init/files/platform-files.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/measures/branch-commits.d.ts +4 -2
- package/dist/measures/branch-commits.d.ts.map +1 -1
- package/dist/measures/branch-commits.js +32 -8
- package/dist/measures/branch-commits.js.map +1 -1
- package/dist/measures/timeline-of.d.ts +3 -2
- package/dist/measures/timeline-of.d.ts.map +1 -1
- package/dist/measures/timeline-of.js +37 -8
- package/dist/measures/timeline-of.js.map +1 -1
- package/dist/platform-layout/platform-layout.d.ts +2 -0
- package/dist/platform-layout/platform-layout.d.ts.map +1 -1
- package/dist/platform-layout/platform-layout.js +2 -0
- package/dist/platform-layout/platform-layout.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/progress/build-next-of.d.ts +9 -0
- package/dist/progress/build-next-of.d.ts.map +1 -0
- package/dist/progress/build-next-of.js +22 -0
- package/dist/progress/build-next-of.js.map +1 -0
- package/dist/progress/format-progress.d.ts.map +1 -1
- package/dist/progress/format-progress.js +3 -0
- package/dist/progress/format-progress.js.map +1 -1
- package/dist/progress/progress.d.ts +3 -1
- package/dist/progress/progress.d.ts.map +1 -1
- package/dist/progress/read-progress.d.ts.map +1 -1
- package/dist/progress/read-progress.js +7 -2
- package/dist/progress/read-progress.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/templates/architecture/extractable.declared.spec.ts.tpl +2 -2
- package/templates/architecture/extractable.manual.spec.ts.tpl +2 -2
- package/templates/architecture/extractable.tsyringe.spec.ts.tpl +2 -2
- package/templates/architecture/hosting.declared.spec.ts.tpl +69 -0
- package/templates/architecture/hosting.manual.spec.ts.tpl +57 -0
- package/templates/architecture/hosting.tsyringe.spec.ts.tpl +69 -0
- package/templates/init/docker/env.example.tpl +8 -0
- package/templates/init/gitignore.tpl +3 -0
- package/templates/init/main.ts.tpl +27 -20
- package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +11 -3
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +25 -4
- package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +47 -65
- package/templates/init/platform/composition/context-selection.tsyringe.ts.tpl +17 -0
- package/templates/init/platform/composition/lay-foundations.manual.ts.tpl +15 -0
- package/templates/init/platform/composition/platform-options.manual.ts.tpl +9 -0
- package/templates/init/platform/composition/routes-of.tsyringe.ts.tpl +51 -0
- package/templates/init/platform/config/app-config.ts.tpl +7 -0
- package/templates/init/platform/config/load-config.ts.tpl +25 -0
- package/templates/init/platform/files/files.module.tsyringe.ts.tpl +6 -2
- package/templates/init/platform/jobs/job-settings.ts.tpl +13 -3
- package/templates/init/platform/privacy/privacy.module.tsyringe.ts.tpl +9 -6
- package/templates/init/platform/redis/open-redis.ts.tpl +13 -8
- package/templates/job/job.declared.ts.tpl +1 -1
- package/templates/job/job.spec.buses.ts.tpl +3 -0
- package/templates/job/job.spec.tsyringe.ts.tpl +29 -1
- package/templates/job/wiring.manual.tpl +3 -0
- package/templates/job/wiring.tsyringe.tpl +1 -1
- package/templates/pipeline/biome.json.tpl +7 -0
- package/templates/pipeline/knip.json.tpl +1 -0
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/service/compose.tpl +1 -1
- package/templates/service/extracted-name.tpl +2 -0
- package/templates/service/extracted.declared.tpl +6 -0
- package/templates/service/extracted.manual.tpl +2 -0
- package/templates/service/extracted.tsyringe.tpl +6 -0
- package/templates/service/main.ts.tpl +5 -1
- package/templates/worker/main.ts.tpl +20 -13
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
|
|
3
|
+
"vcs": {
|
|
4
|
+
"enabled": true,
|
|
5
|
+
"clientKind": "git",
|
|
6
|
+
"useIgnoreFile": true
|
|
7
|
+
},
|
|
3
8
|
"files": {
|
|
4
9
|
"includes": [
|
|
5
10
|
"**/*.ts",
|
|
@@ -14,6 +19,8 @@
|
|
|
14
19
|
"!**/coverage",
|
|
15
20
|
"!**/reports",
|
|
16
21
|
"!.worktrees",
|
|
22
|
+
"!**/.claude",
|
|
23
|
+
"!.mcp.json",
|
|
17
24
|
"!**/.ddd-ts-kit",
|
|
18
25
|
"!**/generated",
|
|
19
26
|
"!**/package-lock.json",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@biomejs/biome": "2.6.2",
|
|
24
24
|
"@commitlint/cli": "^21.2.3",
|
|
25
25
|
"@commitlint/config-conventional": "^21.2.3",
|
|
26
|
-
"@ddd-ts-kit/eslint-plugin": "^0.
|
|
26
|
+
"@ddd-ts-kit/eslint-plugin": "^0.93.0",
|
|
27
27
|
"@eslint/js": "^10.0.1",
|
|
28
28
|
"@typescript/native": "npm:typescript@~7.0.2",
|
|
29
29
|
"@vitest/coverage-v8": "5.0.3",
|
|
@@ -54,8 +54,12 @@ const application = composeApplication(
|
|
|
54
54
|
log: { ...config.log, service: config.serviceName, environment: config.environment },
|
|
55
55
|
traceConsumers: config.tracing.consumers,
|
|
56
56
|
resilience: config.resilience,
|
|
57
|
-
// A context run alone takes its jobs with it, and only its own.
|
|
57
|
+
// A context run alone takes its jobs with it, and only its own: the jobs of the platform stay with the whole application.
|
|
58
58
|
jobs: { start: config.runJobs, settings: jobSettings(process.env, '{{context.kebab}}') },
|
|
59
|
+
platformJobs: false,
|
|
60
|
+
{{#if tenancy.any}}
|
|
61
|
+
tenants: config.tenants,
|
|
62
|
+
{{/if}}
|
|
59
63
|
{{#if cache.redis}}
|
|
60
64
|
redis,
|
|
61
65
|
{{/if}}
|
|
@@ -7,7 +7,7 @@ import { errors } from '{{alias.platform}}/observability/errors{{alias.ext}}';
|
|
|
7
7
|
{{#if http.any}}
|
|
8
8
|
import { createAuthenticator } from '{{alias.platform}}/auth/authentication/create-authenticator{{alias.ext}}';
|
|
9
9
|
{{/if}}
|
|
10
|
-
import { composeApplication } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
|
|
10
|
+
import { composeApplication, hostedContexts } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
|
|
11
11
|
import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
|
|
12
12
|
import { openPersistence } from '{{alias.platform}}/database/open-persistence{{alias.ext}}';
|
|
13
13
|
import { {{events.providerName}} } from '{{alias.platform}}/events/{{events.providerFile}}{{alias.ext}}';
|
|
@@ -31,26 +31,33 @@ const persistence = openPersistence();
|
|
|
31
31
|
const redis = openRedis(config);
|
|
32
32
|
{{/if}}
|
|
33
33
|
|
|
34
|
-
const application = composeApplication(
|
|
35
|
-
|
|
34
|
+
const application = composeApplication(
|
|
35
|
+
persistence,
|
|
36
|
+
{
|
|
37
|
+
events: {{events.provider}},
|
|
36
38
|
{{#if errors.sentry}}
|
|
37
|
-
|
|
39
|
+
errors,
|
|
38
40
|
{{/if}}
|
|
39
41
|
{{#if http.any}}
|
|
40
|
-
|
|
42
|
+
authenticator: createAuthenticator(config),
|
|
43
|
+
{{/if}}
|
|
44
|
+
log: { ...config.log, service: config.serviceName, environment: config.environment },
|
|
45
|
+
traceConsumers: config.tracing.consumers,
|
|
46
|
+
resilience: config.resilience,
|
|
47
|
+
// This process is the one that runs the jobs, whatever `RUN_JOBS` says to the others.
|
|
48
|
+
jobs: { start: true, settings: jobSettings(process.env) },
|
|
49
|
+
{{#if tenancy.any}}
|
|
50
|
+
tenants: config.tenants,
|
|
41
51
|
{{/if}}
|
|
42
|
-
log: { ...config.log, service: config.serviceName, environment: config.environment },
|
|
43
|
-
traceConsumers: config.tracing.consumers,
|
|
44
|
-
resilience: config.resilience,
|
|
45
|
-
// This process is the one that runs the jobs, whatever `RUN_JOBS` says to the others.
|
|
46
|
-
jobs: { start: true, settings: jobSettings(process.env) },
|
|
47
52
|
{{#if cache.redis}}
|
|
48
|
-
|
|
53
|
+
redis,
|
|
49
54
|
{{/if}}
|
|
50
55
|
{{#if files.any}}
|
|
51
|
-
|
|
56
|
+
files: openFiles(config.files),
|
|
52
57
|
{{/if}}
|
|
53
|
-
}
|
|
58
|
+
},
|
|
59
|
+
hostedContexts,
|
|
60
|
+
);
|
|
54
61
|
|
|
55
62
|
await application.start();
|
|
56
63
|
application.logger.info('started', { process: 'worker' });
|