Factory.js
Source: environments/generic/modules/factories/primitive/Factory.js
Generated (UTC): 2026-01-17T15:25:26Z
Factory
Definition: make
Creates a Factory Maker.
Core component of system.
Supports asynchronous loading.
A factory holds code specific to our environment. They are primitive in being environment specific wrappers around stand alone libraries, or composite in being made up of multiple primitive factories.
They must never assume the functionality of the environment exists and must gracefully fail or wait for environments promises to resolve. They must await any dependencies they have.
They follow the environment's factory specification, meaning they communicate their state accordingly.
t1
t2
t3
t4
t5
The following dir structure is generally assumed, but its up to the env conf file to define.
environments/
βββ generic
βΒ Β βββ modules
βΒ Β βββ factories
βΒ Β βΒ Β βββ composite
βΒ Β βΒ Β βββ primitive
βΒ Β βΒ Β βββ Factory.js
βΒ Β βββ libraries
βββ specific
βββ base
βββ modules
βββ factories
βΒ Β βββ composite
βΒ Β βββ primitive
βββ libraries
apps/
βββ generic
βΒ Β βββ modules
βΒ Β βββ factories
βΒ Β βΒ Β βββ composite
βΒ Β βΒ Β βββ primitive
βΒ Β βββ libraries
βββ specific
βββ matkalkyl
βββ modules
βββ factories
βΒ Β βββ composite
βΒ Β βββ primitive
βββ libraries
Options
moduleBasePath
Name of dir at root where modules/ reside. Typically environments/ or apps/.
moduleAbstractionLevel
Modules are either generic or specific to an environment or an app. Thus generic/ or specific/.
moduleType
If the module is factory or module. Thus factory or module.
factOryType
Type of factory. Either primitive or `composite.
primitive
Is a wrapper around library of core standalone functions that could exist in any js app.
These factories do not know of any other factories at their own level of abstraction and wont communicate with them, but can utilize functionality of higher level of abstraction which is the environment, say for logging factory creation.
moduleName
No description.
Returns
P
A Promise being resolved when target module has resolved its promise.