Class ConfigApplication
Hierarchy
-
Application
- ConfigApplication
Constructors
Properties
Methods
Constructors
-
Parameters
-
file: string
-
Optional logger: WorkerOutput
Returns ConfigApplication
-
Properties
Contains already loaded modules
Contains definitions of current application
Get Application root path
Base configuration loaded from webda.config.json
Contains all definitions from imported modules and current code
Flag if application has been compiled already
Current deployment
Deployers type registry
Type declaration
-
[key: string]: any
When the application got initiated
Class Logger
Models type registry
Type declaration
-
[key: string]: any
Webda namespace
Contains package.json of application
Contains webda section of package.json and workspaces if exist
Services type registry
Type declaration
-
[key: string]: ServiceConstructor<Service>
Detect if running as workspace
Methods
-
Parameters
-
name: string
-
model: any
Returns void
-
-
Parameters
-
name: string
-
model: any
Returns void
-
-
Parameters
-
name: string
-
service: ServiceConstructor<Service>
Returns void
-
-
Compile the application if it is a Typescript application Do nothing otherwise
Returns void
-
Return the full name including namespace
In Webda the ServiceType include namespace
Webda/Store
orWebda/Test
This method will make sure the namespace is present, adding it if no '/' is found in the nameParameters
-
Optional name: string
Returns string
-
-
Parameters
-
obj: any
-
className: any
Returns boolean
-
-
Returns void
-
Parameters
-
Optional subpath: string
Returns string
-
-
Parameters
-
Default value deploymentName: string = undefined
Returns Configuration
-
-
Return current Configuration of the Application
Same as calling
getConfiguration(this.currentDeployment);
Returns Configuration
-
Get current deployment name
Returns string
-
Returns object
-
[key: string]: ServiceConstructor<Service>
-
-
Parameters
-
Optional deploymentName: string
Returns Deployment
-
-
Retrieve Git Repository information
GitInformation for more details on how the information is gathered
Returns GitInformation
the git information
-
Parameters
-
model: string
Returns any
-
-
Get all models definitions
Returns object
-
[key: string]: Context | CoreModelDefinition
-
-
Returns CachedModule
-
Retrieve content of package.json
Returns any
-
Retrieve specific webda conf from package.json
In case of workspaces the object is combined
Returns any
-
Get the application files
Returns string[]
-
Parameters
-
name: string
Returns ServiceConstructor<Service>
-
-
Returns object
-
[key: string]: ServiceConstructor<Service<ServiceParameters>>
-
-
Return webda current version
Returns string
package version
-
Returns WorkerOutput
-
Parameters
-
deploymentName: string
Returns boolean
-
-
Return if the application is a typescript application
Returns boolean
-
Load a javascript file and check for Modda
Parameters
-
absolutePath: string
Returns void
-
-
Returns void
-
Load all imported modules and current module It will compile module Generate the current module file Load any imported webda.module.json
Returns void
-
Check package.json
Returns void
-
Parameters
-
level: WorkerLogLevel
-
Rest ...args: any[]
Returns void
-
-
Migrate from v0 to v1 configuration
A V0 is a webda.config.json that does not contain any version tag
Parameters
-
config: any
Returns Configuration
-
-
Migrate from v1 to v2 configuration format
Parameters
-
config: ConfigurationV1
Returns Configuration
-
-
Set the status of the compilation
Parameters
-
compile: boolean
true will avoid trigger new compilation
Returns void
-
-
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
-
-
Parameters
-
info: string
Returns any
-
-
Set the current deployment for the application Call to getCurrentConfiguration will resolve to the computed configuration for the deployment If needed, you can call the method with undefined to reset to default configuration
Parameters
-
deployment: string
to set
Returns void
-
-
Allow variable inside of string
Parameters
-
templateString: string
to copy
-
Optional replacements: any
additional replacements to run
Returns any
-
Generated using TypeDoc