Docs
Root Β·
docs
Files
Root: docs/
Factory.js
File: environments/generic/modules/factories/primitive/Factory.js.md

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.