Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConfigApplication

Hierarchy

  • Application
    • ConfigApplication

Constructors

Properties

_loaded: string[]

Contains already loaded modules

appModule: Module

Contains definitions of current application

appPath: string

Get Application root path

baseConfiguration: Configuration

Base configuration loaded from webda.config.json

cachedModules: CachedModule

Contains all definitions from imported modules and current code

compiled: boolean

Flag if application has been compiled already

currentDeployment: string

Current deployment

deployers: object

Deployers type registry

Type declaration

  • [key: string]: any
initTime: number

When the application got initiated

logger: WorkerOutput

Class Logger

models: object

Models type registry

Type declaration

  • [key: string]: any
namespace: string

Webda namespace

packageDescription: any

Contains package.json of application

packageWebda: any

Contains webda section of package.json and workspaces if exist

services: object

Services type registry

Type declaration

  • [key: string]: ServiceConstructor<Service>
workspacesPath: string

Detect if running as workspace

Methods

  • addDeployer(name: string, model: any): void
  • addModel(name: string, model: any): void
  • addService(name: string, service: ServiceConstructor<Service>): void
  • compile(): void
  • completeNamespace(name?: string): string
  • extends(obj: any, className: any): boolean
  • generateModule(): void
  • getAppPath(subpath?: string): string
  • getConfiguration(deploymentName?: string): Configuration
  • getCurrentConfiguration(): Configuration
  • getCurrentDeployment(): string
  • getDeployers(): object
  • getDeployment(deploymentName?: string): Deployment
  • getGitInformation(): GitInformation
  • getModel(model: string): any
  • getModels(): object
  • getModules(): CachedModule
  • getPackageDescription(): any
  • getPackageWebda(): any
  • getPackagesLocations(): string[]
  • getService(name: string): ServiceConstructor<Service>
  • getServices(): object
  • getWebdaVersion(): string
  • getWorkerOutput(): WorkerOutput
  • hasDeployment(deploymentName: string): boolean
  • isTypescript(): boolean
  • loadJavascriptFile(absolutePath: string): void
  • loadLocalModule(): void
  • loadModules(): void
  • loadPackageInfos(): void
  • migrateV0Config(config: any): Configuration
  • migrateV1Config(config: ConfigurationV1): Configuration
  • preventCompilation(compile: boolean): void
  • replaceVariables(object: any, replacements?: any): any
  • Allow variable inside object strings

    Example

    replaceVariables({
     myobj: "${test.replace}"
    }, {
     test: {
       replace: 'plop'
     }
    })

    will return

    {
     myobj: 'plop'
    }

    By default the replacements map contains

    {
     git: GitInformation,
     package: 'package.json content',
     deployment: string,
     now: number,
     ...replacements
    }

    See: GitInformation

    Parameters

    • object: any

      a duplicated object with replacement done

    • Optional replacements: any

      additional replacements to run

    Returns any

  • resolveRequire(info: string): any
  • setCurrentDeployment(deployment: string): void
  • stringParameter(templateString: string, replacements?: any): any

Generated using TypeDoc