Browse Source

feat(news): register news:isDeliveryEnabled config

Mirror the OPENTELEMETRY_ENABLED pattern: add `'news:isDeliveryEnabled'`
to CONFIG_KEYS and a matching `defineConfig` entry with
`envVarName: 'NEWS_DELIVERY_ENABLED'` and `defaultValue: true`. With the
default baked into code, every deployment is opt-in to delivery without
any DB seed or env injection.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ryotaro Nagahara 2 weeks ago
parent
commit
0e878797a1
1 changed files with 9 additions and 0 deletions
  1. 9 0
      apps/app/src/server/service/config-manager/config-definition.ts

+ 9 - 0
apps/app/src/server/service/config-manager/config-definition.ts

@@ -280,6 +280,9 @@ export const CONFIG_KEYS = [
   'otel:anonymizeInBestEffort',
   'otel:serviceInstanceId',
 
+  // News Settings
+  'news:isDeliveryEnabled',
+
   // S2S Messaging Pubsub Settings
   's2sMessagingPubsub:serverType',
   's2sMessagingPubsub:nchan:publishPath',
@@ -1215,6 +1218,12 @@ export const CONFIG_DEFINITIONS = {
     defaultValue: undefined,
   }),
 
+  // News Settings
+  'news:isDeliveryEnabled': defineConfig<boolean>({
+    envVarName: 'NEWS_DELIVERY_ENABLED',
+    defaultValue: true,
+  }),
+
   // S2S Messaging Pubsub Settings
   's2sMessagingPubsub:serverType': defineConfig<string | undefined>({
     envVarName: 'S2SMSG_PUBSUB_SERVER_TYPE',