Improve dependencies and PostgreSQL in archetypes #1763
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
🤖 Generated by Copilot at 95b6a6e
This pull request updates the
@crowd/archetype-*
packages to support additional environment variables, Kafka security options, PostgreSQL read/write connections, and OpenTelemetry instrumentation. It also renames and reorganizes the archetypes packages to avoid conflicts with other@crowd
packages.
🤖 Generated by Copilot at 95b6a6e
Why
How
🤖 Generated by Copilot at 95b6a6e
paths
property in thetsconfig.json
files to use the new@crowd/archetype-*
pattern for the archetypes packages (link, link, link, link, link, link)envvars
property to theConfig
type in the@crowd/archetype-standard
package and use it to validate the additional environment variables required by the service (link, link)sasl
andssl
properties to theKafkaConfig
type in the@crowd/archetype-standard
package and add aTODO
comment to handle the SSL and SASL configuration for the Kafka client in the future (link, link)@crowd/archetype-standard
package to include the@opentelemetry/instrumentation-pg
and@opentelemetry/instrumentation-redis-4
packages for tracing and metrics of the PostgreSQL and Redis clients (link)ServiceWorker
class in theservices/archetypes/worker/src/index.ts
file to include theCROWD_POSTGRES_READER_HOST
andCROWD_POSTGRES_WRITER_HOST
variables in theenvvars
value and use them to connect to the PostgreSQL reader and writer instances respectively (link, link, link)ServiceWorker
class in theservices/archetypes/worker/src/index.ts
file to have two protected properties:_postgresReader
and_postgresWriter
for storing theDbStore
instances for the PostgreSQL reader and writer connections respectively (link)postgres
getter in theServiceWorker
class in theservices/archetypes/worker/src/index.ts
file to return an object with two properties:reader
andwriter
for accessing theDbStore
instances for the PostgreSQL reader and writer connections respectively (link)ServiceWorker
class in theservices/archetypes/worker/src/index.ts
file to close the PostgreSQL writer connection before the reader connection (link)Checklist ✅
Feature
,Improvement
, orBug
.