All files / src/constants Defaults.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50                                      9x                                                            
import { SystemConfiguration } from '@/types/SystemConfiguration'
 
/**
 * @constant
 *
 * Default settings for the kernel.
 *
 * @remarks
 * What an application logs and protects when it overrides nothing. Anything a
 * platform resource settles — a binding name, a TTL, a model, a connection
 * string — belongs to an adapter package instead, and the application merges
 * both halves when it calls {@link configure}.
 *
 * Nothing here is application-specific. Anything that is belongs in an override.
 *
 * @author Bayu Dwiyan Satria
 * @version 1.0.0
 * @since 1.0.0
 */
export const systemDefaults: SystemConfiguration = {
  /**
   * Logging — structured lines to the runtime's log stream at `info` and above.
   * `LOG_LEVEL` in the environment overrides this per deployment.
   *
   * `service` is the field every application is expected to override; it names
   * the emitter in the logstream, and the placeholder here is deliberately
   * generic so an un-overridden deployment reads as unconfigured rather than as
   * some other project.
   */
  logging: {
    level: 'info',
    service: 'app'
  },
 
  /**
   * Security — API-key authentication on `/api/v1/*`, with the documentation
   * routes left public. Nothing is exempted and every origin is allowed, so a
   * project opts into both by naming them; see `SecuritySettings`.
   */
  security: {
    urlPattern: '/api/v1/*',
    publicRoutes: [
      '/swagger-ui/*', 
      '/v3/api-docs/*'
    ],
    excludedRoutes: [],
    allowedOrigins: []
  }
}