Class: UnpackedApplication
An unpacked application load dynamically all webda.module.json And load also all the package description
The normal Application is designed to load all this information from the cachedModule to avoid any unecessary action within a production environment
Extends
Constructors
new UnpackedApplication(file, logger)
new UnpackedApplication(
file
,logger
?):UnpackedApplication
Parameters
• file: string
• logger?: WorkerOutput
Returns
Overrides
Source
packages/core/src/unpackedapplication.ts:35
Properties
_loaded
protected
_loaded:string
[] =[]
Contains already loaded modules
Inherited from
Source
packages/core/src/application.ts:473
appModule
protected
appModule:Module
Contains definitions of current application
Inherited from
Source
packages/core/src/application.ts:457
appPath
readonly
appPath:string
Get Application root path
Inherited from
Source
packages/core/src/application.ts:444
baseConfiguration
protected
baseConfiguration:Configuration
Base configuration loaded from webda.config.json
Inherited from
Source
packages/core/src/application.ts:448
configurationFile
readonly
configurationFile:string
Configuration file
Inherited from
Source
packages/core/src/application.ts:523
currentDeployment
protected
currentDeployment:string
Current deployment
Inherited from
Source
packages/core/src/application.ts:452
deployers
protected
deployers:Object
={}
Deployers type registry
Index signature
[key
: string
]: any
Inherited from
Source
packages/core/src/application.ts:478
deploymentFile
deploymentFile:
string
Current deployment file
Inherited from
Source
packages/core/src/application.ts:527
flatHierarchy
protected
flatHierarchy:Object
={}
Direct parent of a model
Index signature
[key
: string
]: string
Inherited from
Source
packages/core/src/application.ts:518
graph
protected
graph:ModelsGraph
={}
Models graph
Inherited from
Source
packages/core/src/application.ts:493
initTime
protected
initTime:number
When the application got initiated
Inherited from
Source
packages/core/src/application.ts:513
logger
protected
logger:WorkerOutput
Class Logger
Inherited from
Source
packages/core/src/application.ts:503
moddas
protected
moddas:Object
={}
Moddas registry
Index signature
[key
: string
]: Modda
Inherited from
Source
packages/core/src/application.ts:483
models
protected
models:Object
={}
Models type registry
Index signature
[key
: string
]: CoreModelDefinition
Inherited from
Source
packages/core/src/application.ts:488
plurals
protected
plurals:Object
={}
Models specific plurals
Index signature
[key
: string
]: string
Inherited from
Source
packages/core/src/application.ts:498
workspacesPath
protected
workspacesPath:string
=""
Detect if running as workspace
Inherited from
Source
packages/core/src/application.ts:508
active
static
protected
active:Application
Current application
Inherited from
Source
packages/core/src/application.ts:532
Methods
addDeployer()
addDeployer(
name
,model
):this
Add a new deployer
Parameters
• name: string
• model: any
Returns
this
Inherited from
Source
packages/core/src/application.ts:990
addModel()
addModel(
name
,model
,dynamic
):this
Add a new model
Parameters
• name: string
• model: any
• dynamic: boolean
= true
Returns
this
Inherited from
Source
packages/core/src/application.ts:969
addService()
addService(
name
,service
):this
Add a new service
Parameters
• name: string
• service: Modda
Returns
this
Inherited from
Source
packages/core/src/application.ts:737
completeConfiguration()
completeConfiguration(
configuration
):Configuration
Add Moddas, Models and Deployers definitions It also add the project metadata
Parameters
• configuration: Configuration
Returns
Source
packages/core/src/unpackedapplication.ts:90
completeNamespace()
completeNamespace(
name
):string
Return the full name including namespace
In Webda the ServiceType include namespace Webda/Store
or Webda/Test
This method will make sure the namespace is present, adding it if no '/'
is found in the name
Parameters
• name: string
= ""
Returns
string
Inherited from
Source
packages/core/src/application.ts:1234
filterModule()
filterModule(
_filename
):boolean
Only allow local and core module and sample-app
Parameters
• _filename: string
Returns
boolean
Source
packages/core/src/unpackedapplication.ts:257
findModules()
findModules(
module
):string
[]
Load all imported modules and current module It will compile module Generate the current module file Load any imported webda.module.json
Parameters
• module: CachedModule
Returns
string
[]
Source
packages/core/src/unpackedapplication.ts:211
getAppPath()
getAppPath(
subpath
):string
Return the current app path
Parameters
• subpath: string
= undefined
to append to