@dooer/dooer-test-env 1.2.0 → 1.2.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.
@@ -309,6 +309,13 @@ function rewriteBrowserUrls(env, portMap) {
309
309
  return env
310
310
  }
311
311
 
312
+ // Legacy service-name aliases the real stack still honours (a service registers/answers under an old name
313
+ // too). We reproduce them as Docker network aliases on the real service's container, so a caller resolving
314
+ // the old name (e.g. via @dooer/service discovery) reaches the right container instead of ENOTFOUND.
315
+ const SERVICE_ALIASES = {
316
+ 'service-closing': ['service-periods'], // service-periods is a legacy alias for service-closing (Jimmy 2026-09-03)
317
+ }
318
+
312
319
  // Turn the parsed manifests into the compose object.
313
320
  function buildCompose(services, frontends, { profile } = {}) {
314
321
  const wantedSvc = profile ? services.filter((s) => profilesFor(s.name).includes(profile)) : services
@@ -327,6 +334,9 @@ function buildCompose(services, frontends, { profile } = {}) {
327
334
  environment: rewriteBrowserUrls({ ...buildServiceEnv(svc), ...(SERVICE_ENV_OVERRIDES[svc.name] || {}) }, portMap),
328
335
  // publish the GraphQL gateway on the host so the frontends' browsers can reach it at localhost
329
336
  ...(svc.name === 'service-graphql' ? { ports: [`${GATEWAY_HOST_PORT}:3000`] } : {}),
337
+ // legacy-name DNS aliases (e.g. service-periods → service-closing), so callers resolving the old name
338
+ // reach this container on the compose network.
339
+ ...(SERVICE_ALIASES[svc.name] ? { networks: { default: { aliases: SERVICE_ALIASES[svc.name] } } } : {}),
330
340
  depends_on: ['postgres', 'redis', 'discovery-router'],
331
341
  profiles: profilesFor(svc.name),
332
342
  restart: 'unless-stopped',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dooer/dooer-test-env",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Run the whole Dooer backend locally (staging DB minus customers), copy/purge customers between environments, and shred — one CLI.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": "Dooer/cli-dooer-test-env",