Blueprint & build
The Blueprint
The Blueprint is the whole application described as data: adapters, providers, middleware, routes and your own config, all under dotted stone.* keys. It is assembled once before the first event and then frozen, so the framework only ever reads a settled manifest.
#A keyed store
The Blueprint behaves like a deep, dotted-key store. Reads take a key and a default; writes set a key. During the build phase it is mutable; after, it is read-only.
blueprint.get('stone.name') // read
blueprint.get('stone.tasks.pageSize', 20) // read with a default
blueprint.has('stone.router') // presence
blueprint.set('stone.tasks.pageSize', 50) // write (build phase only)#The Blueprint API
| Method | Type | Description |
|---|---|---|
| get(key, default?) | <T>(key, T?) => T | Read a value by dotted key, with an optional fallback. |
| set(key, value) | (key, value) => this | Write a value (during the build phase). |
| has(key) | (key) => boolean | Whether a key is present. |
| add(key, value) | (key, value) => this | Append to an array-valued key (e.g. adapters, middleware). |
#Well-known keys
Framework and modules own sub-trees under stone.*; you own your app's namespace. The full list lives in the configuration reference; the common ones:
| Option | Type | Description |
|---|---|---|
| stone.name | string | The application name. |
| stone.adapters | array | The stacked adapters (usually written by adapter blueprints). |
| stone.providers | array | Registered service providers. |
| stone.middleware | array | Global middleware. |
| stone.router | object | Router configuration. |